@zambon-dev/library 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -9
- package/README.md +9 -9
- package/fesm2022/zambon-dev-library.mjs +304 -445
- package/fesm2022/zambon-dev-library.mjs.map +1 -1
- package/package.json +10 -9
- package/styles/variables.scss +26 -26
- package/types/zambon-dev-library.d.ts +1045 -0
- package/index.d.ts +0 -10
- package/lib/components/base.component.d.ts +0 -9
- package/lib/components/catalog-select/catalog-select.component.d.ts +0 -121
- package/lib/components/data-grid/data-grid.component.d.ts +0 -51
- package/lib/components/data-grid-row/data-grid-row.component.d.ts +0 -31
- package/lib/components/form-group/form-group.component.d.ts +0 -8
- package/lib/components/form-input/form-input.component.d.ts +0 -47
- package/lib/components/form-input-group/form-input-group.component.d.ts +0 -40
- package/lib/components/group-accordion/group-accordion.component.d.ts +0 -13
- package/lib/components/group-container/group-container.component.d.ts +0 -16
- package/lib/components/group-scroll-spy/group-scroll-spy.component.d.ts +0 -14
- package/lib/components/index.d.ts +0 -18
- package/lib/components/modal/modal.component.d.ts +0 -26
- package/lib/components/multi-editor/multi-editor.component.d.ts +0 -30
- package/lib/components/multi-select/multi-select.component.d.ts +0 -25
- package/lib/components/multi-select/result-grid/result-grid.component.d.ts +0 -18
- package/lib/components/ribbon/ribbon.component.d.ts +0 -5
- package/lib/components/ribbon-button/ribbon-button.component.d.ts +0 -32
- package/lib/components/ribbon-group/ribbon-group.component.d.ts +0 -10
- package/lib/components/sidebar/sidebar.component.d.ts +0 -41
- package/lib/components/sidebar-item/sidebar-item.component.d.ts +0 -34
- package/lib/directives/index.d.ts +0 -1
- package/lib/directives/scroll-spy.directive.d.ts +0 -16
- package/lib/helpers/date-helpers.d.ts +0 -3
- package/lib/helpers/display-controls.d.ts +0 -29
- package/lib/helpers/guid-helper.d.ts +0 -3
- package/lib/helpers/index.d.ts +0 -4
- package/lib/helpers/route-formatter.d.ts +0 -4
- package/lib/library.module.d.ts +0 -27
- package/lib/models/batch-update.d.ts +0 -4
- package/lib/models/catalog-entry.d.ts +0 -4
- package/lib/models/catalog-result.d.ts +0 -5
- package/lib/models/configs/data-grid-configs.d.ts +0 -9
- package/lib/models/configs/grid-configs.d.ts +0 -9
- package/lib/models/configs/index.d.ts +0 -2
- package/lib/models/data-grid-parameters.d.ts +0 -12
- package/lib/models/grid-column.d.ts +0 -9
- package/lib/models/index.d.ts +0 -14
- package/lib/models/list-result.d.ts +0 -4
- package/lib/models/modal.interface.d.ts +0 -7
- package/lib/models/multi-editor-changes.d.ts +0 -6
- package/lib/models/multi-selector-changes.d.ts +0 -4
- package/lib/models/ribbon-button-option.d.ts +0 -13
- package/lib/models/ribbon-group-child.d.ts +0 -3
- package/lib/models/sidebar/index.d.ts +0 -5
- package/lib/models/sidebar/sidebar-configs.d.ts +0 -22
- package/lib/models/sidebar/sidebar-menu-open-mode.d.ts +0 -32
- package/lib/models/sidebar/sidebar-menu.d.ts +0 -22
- package/lib/models/sidebar/sidebar-profile.d.ts +0 -5
- package/lib/models/sidebar/sidebar-region.d.ts +0 -6
- package/lib/models/tab-view.d.ts +0 -5
- package/lib/pipes/enum.d.ts +0 -12
- package/lib/pipes/index.d.ts +0 -3
- package/lib/pipes/replace-many.pipe.d.ts +0 -9
- package/lib/pipes/replace.pipe.d.ts +0 -7
- package/lib/services/catalog.service.d.ts +0 -11
- package/lib/services/configs-providers/data-grid-configs.provider.d.ts +0 -8
- package/lib/services/configs-providers/grid-configs.provider.d.ts +0 -9
- package/lib/services/configs-providers/index.d.ts +0 -2
- package/lib/services/data-providers/data-provider.service.d.ts +0 -29
- package/lib/services/data-providers/index.d.ts +0 -1
- package/lib/services/datasets/base.dataset.d.ts +0 -15
- package/lib/services/datasets/data-grid.dataset.d.ts +0 -37
- package/lib/services/datasets/grid.dataset.d.ts +0 -59
- package/lib/services/datasets/index.d.ts +0 -5
- package/lib/services/datasets/multi-editor.dataset.d.ts +0 -22
- package/lib/services/datasets/multi-select-result.dataset.d.ts +0 -26
- package/lib/services/form-group.service.d.ts +0 -5
- package/lib/services/form.service.d.ts +0 -39
- package/lib/services/index.d.ts +0 -6
- package/lib/services/sidebar.service.d.ts +0 -34
- package/lib/validators/date.validators.d.ts +0 -13
- package/lib/validators/index.d.ts +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, inject, Injectable, EventEmitter, InjectionToken,
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject, Injectable, EventEmitter, InjectionToken, Output, Input, KeyValueDiffers, ViewContainerRef, TemplateRef, ElementRef, ViewChild, HostListener, ChangeDetectorRef, NgZone, Directive, ContentChildren, Pipe, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, ReplaySubject, take, throwError, tap, map, takeUntil, filter, debounceTime, startWith, pairwise, Observable, forkJoin, switchMap, of, fromEvent, delay, merge } from 'rxjs';
|
|
4
4
|
import { Overlay, OverlayPositionBuilder } from '@angular/cdk/overlay';
|
|
5
5
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
6
|
-
import * as i1 from '@angular/common';
|
|
7
|
-
import { formatDate, CommonModule, NgIf, NgSwitch, NgSwitchCase, KeyValuePipe, NgFor, NgStyle, NgTemplateOutlet, NgClass } from '@angular/common';
|
|
8
6
|
import * as i1$1 from '@angular/forms';
|
|
9
|
-
import { FormGroupDirective, FormGroupName, FormsModule, ReactiveFormsModule,
|
|
7
|
+
import { FormGroupDirective, FormGroupName, ControlContainer, FormsModule, ReactiveFormsModule, FormControl, FormArray, FormGroup } from '@angular/forms';
|
|
10
8
|
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
11
9
|
import { HttpClient } from '@angular/common/http';
|
|
12
10
|
import { ActivatedRoute, Router, NavigationStart, NavigationEnd } from '@angular/router';
|
|
11
|
+
import * as i1 from '@angular/common';
|
|
12
|
+
import { formatDate, CommonModule, NgStyle, NgTemplateOutlet, KeyValuePipe, NgClass } from '@angular/common';
|
|
13
13
|
import * as i1$2 from '@angular/cdk/scrolling';
|
|
14
|
-
import {
|
|
14
|
+
import { ScrollingModule, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
15
15
|
import * as i2 from 'ngx-resize-observer';
|
|
16
16
|
import { NgxResizeObserverModule } from 'ngx-resize-observer';
|
|
17
17
|
|
|
@@ -30,12 +30,12 @@ class BaseComponent {
|
|
|
30
30
|
this.destroy$.next(true);
|
|
31
31
|
this.destroy$.complete();
|
|
32
32
|
}
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: BaseComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BaseComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
|
-
args: [{ template: '' }]
|
|
38
|
+
args: [{ changeDetection: ChangeDetectionStrategy.Eager, template: '' }]
|
|
39
39
|
}] });
|
|
40
40
|
|
|
41
41
|
class DateHelpers {
|
|
@@ -114,11 +114,8 @@ class RouterFormatter {
|
|
|
114
114
|
parentRoute = this.getURL(route.parent);
|
|
115
115
|
}
|
|
116
116
|
let path = route.routeConfig?.path ?? '';
|
|
117
|
-
route.paramMap.keys
|
|
118
|
-
.
|
|
119
|
-
path = path.replace(':' + k, k === 'view'
|
|
120
|
-
? ''
|
|
121
|
-
: (route.paramMap.get(k) ?? ''));
|
|
117
|
+
route.paramMap.keys.forEach((k) => {
|
|
118
|
+
path = path.replace(':' + k, k === 'view' ? '' : (route.paramMap.get(k) ?? ''));
|
|
122
119
|
});
|
|
123
120
|
if (!route.parent || (parentRoute !== '' && parentRoute !== '/' && route.routeConfig?.path && path)) {
|
|
124
121
|
parentRoute += '/';
|
|
@@ -143,13 +140,13 @@ class CatalogService {
|
|
|
143
140
|
search(endpoint, maxResults, criteria, filters = null) {
|
|
144
141
|
return this.http.post(`${endpoint}`, { maxResults, criteria, filters });
|
|
145
142
|
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
147
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CatalogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
144
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CatalogService, providedIn: 'root' });
|
|
148
145
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CatalogService, decorators: [{
|
|
150
147
|
type: Injectable,
|
|
151
148
|
args: [{
|
|
152
|
-
providedIn: 'root'
|
|
149
|
+
providedIn: 'root',
|
|
153
150
|
}]
|
|
154
151
|
}] });
|
|
155
152
|
|
|
@@ -176,9 +173,7 @@ class DataProviderService {
|
|
|
176
173
|
//#endregion
|
|
177
174
|
//#region Constructor and Angular life cycle methods
|
|
178
175
|
constructor() {
|
|
179
|
-
this.activatedRoute.paramMap
|
|
180
|
-
.pipe(take(1))
|
|
181
|
-
.subscribe((paramMap) => {
|
|
176
|
+
this.activatedRoute.paramMap.pipe(take(1)).subscribe((paramMap) => {
|
|
182
177
|
const newID = Number(paramMap.get('id'));
|
|
183
178
|
if (newID !== this.entityID) {
|
|
184
179
|
this._entityID = newID;
|
|
@@ -242,10 +237,10 @@ class DataProviderService {
|
|
|
242
237
|
}
|
|
243
238
|
this.modelCache.next(model);
|
|
244
239
|
}
|
|
245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
246
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
241
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataProviderService });
|
|
247
242
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataProviderService, decorators: [{
|
|
249
244
|
type: Injectable
|
|
250
245
|
}], ctorParameters: () => [] });
|
|
251
246
|
|
|
@@ -275,10 +270,10 @@ class BaseDataset {
|
|
|
275
270
|
this.destroy$.next(true);
|
|
276
271
|
this.destroy$.complete();
|
|
277
272
|
}
|
|
278
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
279
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BaseDataset, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
274
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BaseDataset });
|
|
280
275
|
}
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: BaseDataset, decorators: [{
|
|
282
277
|
type: Injectable
|
|
283
278
|
}], ctorParameters: () => [] });
|
|
284
279
|
|
|
@@ -303,10 +298,10 @@ class GridConfigsProvider {
|
|
|
303
298
|
rowsToDisplay: 6,
|
|
304
299
|
};
|
|
305
300
|
}
|
|
306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
307
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
301
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridConfigsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
302
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridConfigsProvider });
|
|
308
303
|
}
|
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridConfigsProvider, decorators: [{
|
|
310
305
|
type: Injectable
|
|
311
306
|
}], ctorParameters: () => [] });
|
|
312
307
|
|
|
@@ -373,6 +368,10 @@ class GridDataset extends BaseDataset {
|
|
|
373
368
|
addNewRow(row) {
|
|
374
369
|
this.updateLoadedRows([row]);
|
|
375
370
|
}
|
|
371
|
+
/** The key of the currently focused row, or null. Read by DataGridRowComponent's host binding. */
|
|
372
|
+
get focusedRowKey() {
|
|
373
|
+
return this.focusedRow;
|
|
374
|
+
}
|
|
376
375
|
clearFocusedRow() {
|
|
377
376
|
this.focusedRow = null;
|
|
378
377
|
}
|
|
@@ -385,8 +384,7 @@ class GridDataset extends BaseDataset {
|
|
|
385
384
|
}
|
|
386
385
|
getRowID(key) {
|
|
387
386
|
const row = this.getRowData(key);
|
|
388
|
-
return this.compareProperty.split('.')
|
|
389
|
-
.reduce((row, property) => row[property], row);
|
|
387
|
+
return this.compareProperty.split('.').reduce((row, property) => row[property], row);
|
|
390
388
|
}
|
|
391
389
|
getRowInternalKey(row) {
|
|
392
390
|
return row[KEY_FIELD];
|
|
@@ -395,11 +393,10 @@ class GridDataset extends BaseDataset {
|
|
|
395
393
|
if (!this.hasLoadedRows) {
|
|
396
394
|
return false;
|
|
397
395
|
}
|
|
398
|
-
const loadedIDs = this.compareProperty
|
|
396
|
+
const loadedIDs = this.compareProperty
|
|
397
|
+
.split('.')
|
|
399
398
|
.reduce((loadedRows, property) => loadedRows.map((row) => row[property]), this._loadedRows ?? [])
|
|
400
|
-
.map((row) => typeof id === 'string' ? `${row}`
|
|
401
|
-
: typeof id === 'number' ? parseInt(`${row}`)
|
|
402
|
-
: row);
|
|
399
|
+
.map((row) => (typeof id === 'string' ? `${row}` : typeof id === 'number' ? parseInt(`${row}`) : row));
|
|
403
400
|
return loadedIDs.indexOf(id) >= 0;
|
|
404
401
|
}
|
|
405
402
|
isKeyExists(key) {
|
|
@@ -436,7 +433,7 @@ class GridDataset extends BaseDataset {
|
|
|
436
433
|
error: (_) => {
|
|
437
434
|
this.isLoading = false;
|
|
438
435
|
this.loadFinished.emit(false);
|
|
439
|
-
}
|
|
436
|
+
},
|
|
440
437
|
});
|
|
441
438
|
}
|
|
442
439
|
refresh() {
|
|
@@ -498,17 +495,17 @@ class GridDataset extends BaseDataset {
|
|
|
498
495
|
rows.forEach((row) => {
|
|
499
496
|
row[KEY_FIELD] = GuidHelper.generateGUID();
|
|
500
497
|
});
|
|
501
|
-
this._loadedRows = [...this._loadedRows ?? [], ...rows];
|
|
502
|
-
this._loadedKeys = [...this._loadedKeys ?? [], ...rows.map((row) => row[KEY_FIELD])];
|
|
498
|
+
this._loadedRows = [...(this._loadedRows ?? []), ...rows];
|
|
499
|
+
this._loadedKeys = [...(this._loadedKeys ?? []), ...rows.map((row) => row[KEY_FIELD])];
|
|
503
500
|
this.recordBlock += rows.length;
|
|
504
501
|
if (rows.length < this.configsProvider.configs.recordBlockSize) {
|
|
505
502
|
this.loadedLastRow = true;
|
|
506
503
|
}
|
|
507
504
|
}
|
|
508
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
509
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
505
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridDataset, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
506
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridDataset });
|
|
510
507
|
}
|
|
511
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GridDataset, decorators: [{
|
|
512
509
|
type: Injectable
|
|
513
510
|
}], ctorParameters: () => [] });
|
|
514
511
|
|
|
@@ -553,7 +550,7 @@ class DataGridDataset extends GridDataset {
|
|
|
553
550
|
this.selectedRowsChanged.emit(selectedKeys.reduce((keys, key) => {
|
|
554
551
|
keys[key] = {
|
|
555
552
|
rowData: this.getRowData(key),
|
|
556
|
-
selected: false
|
|
553
|
+
selected: false,
|
|
557
554
|
};
|
|
558
555
|
return keys;
|
|
559
556
|
}, {}));
|
|
@@ -570,15 +567,14 @@ class DataGridDataset extends GridDataset {
|
|
|
570
567
|
[key]: {
|
|
571
568
|
rowData: this.getRowData(key),
|
|
572
569
|
selected: false,
|
|
573
|
-
}
|
|
570
|
+
},
|
|
574
571
|
});
|
|
575
572
|
}
|
|
576
573
|
deselectRowID(id) {
|
|
577
574
|
if (!this.hasLoadedRows) {
|
|
578
575
|
return;
|
|
579
576
|
}
|
|
580
|
-
const index = this.loadedKeys.map((key) => this.getRowID(key))
|
|
581
|
-
.indexOf(id);
|
|
577
|
+
const index = this.loadedKeys.map((key) => this.getRowID(key)).indexOf(id);
|
|
582
578
|
const key = this.loadedKeys[index];
|
|
583
579
|
this.deselectRow(key);
|
|
584
580
|
}
|
|
@@ -586,7 +582,8 @@ class DataGridDataset extends GridDataset {
|
|
|
586
582
|
if (!this.hasLoadedRows || !this.hasSelectedRows) {
|
|
587
583
|
return [];
|
|
588
584
|
}
|
|
589
|
-
return this.selectedRowKeys
|
|
585
|
+
return this.selectedRowKeys
|
|
586
|
+
.map((key) => this.loadedKeys.indexOf(key))
|
|
590
587
|
.filter((index) => index >= 0)
|
|
591
588
|
.map((index) => this.loadedRows[index]);
|
|
592
589
|
}
|
|
@@ -604,7 +601,8 @@ class DataGridDataset extends GridDataset {
|
|
|
604
601
|
return;
|
|
605
602
|
}
|
|
606
603
|
if (this.hasSelectedRows) {
|
|
607
|
-
keys
|
|
604
|
+
keys
|
|
605
|
+
.filter((key) => this.isKeySelected(key))
|
|
608
606
|
.forEach((key) => {
|
|
609
607
|
this.removeSelectedRow(key);
|
|
610
608
|
});
|
|
@@ -628,7 +626,7 @@ class DataGridDataset extends GridDataset {
|
|
|
628
626
|
[key]: {
|
|
629
627
|
rowData: this.getRowData(key),
|
|
630
628
|
selected: true,
|
|
631
|
-
}
|
|
629
|
+
},
|
|
632
630
|
});
|
|
633
631
|
}
|
|
634
632
|
}
|
|
@@ -686,10 +684,10 @@ class DataGridDataset extends GridDataset {
|
|
|
686
684
|
this.selectedRowKeys.splice(index, 1);
|
|
687
685
|
}
|
|
688
686
|
}
|
|
689
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
690
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
687
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridDataset, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
688
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridDataset });
|
|
691
689
|
}
|
|
692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
690
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridDataset, decorators: [{
|
|
693
691
|
type: Injectable
|
|
694
692
|
}], ctorParameters: () => [] });
|
|
695
693
|
|
|
@@ -744,8 +742,7 @@ class MultiEditorDataset extends BaseDataset {
|
|
|
744
742
|
entitiesToInsertOrUpdate: Object.entries(this.modifiedValues.changed).map(([_, v]) => v),
|
|
745
743
|
entitiesToDelete: this.modifiedValues.removed,
|
|
746
744
|
};
|
|
747
|
-
return this.saveData(batchUpdate)
|
|
748
|
-
.pipe(tap(() => this.savedChanges.emit()));
|
|
745
|
+
return this.saveData(batchUpdate).pipe(tap(() => this.savedChanges.emit()));
|
|
749
746
|
}
|
|
750
747
|
storeFakeIDGenerated(id) {
|
|
751
748
|
if (this.fakeIDsGenerated.indexOf(id) >= 0) {
|
|
@@ -757,10 +754,10 @@ class MultiEditorDataset extends BaseDataset {
|
|
|
757
754
|
this.modifiedValues.changed[key] = newRowData;
|
|
758
755
|
this.dataGridDataset.updateRow(key, newRowData);
|
|
759
756
|
}
|
|
760
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
761
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
757
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiEditorDataset, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
758
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiEditorDataset });
|
|
762
759
|
}
|
|
763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiEditorDataset, decorators: [{
|
|
764
761
|
type: Injectable
|
|
765
762
|
}], ctorParameters: () => [] });
|
|
766
763
|
|
|
@@ -797,8 +794,7 @@ class MultiSelectResultDataset extends GridDataset {
|
|
|
797
794
|
idsToAdd: this.idsToAdd,
|
|
798
795
|
idsToRemove: this.idsToRemove,
|
|
799
796
|
};
|
|
800
|
-
return this.saveData(changes)
|
|
801
|
-
.pipe(tap(() => {
|
|
797
|
+
return this.saveData(changes).pipe(tap(() => {
|
|
802
798
|
this.savedChanges.emit();
|
|
803
799
|
this.clearSelection();
|
|
804
800
|
this.clearLoadedRows();
|
|
@@ -839,37 +835,34 @@ class MultiSelectResultDataset extends GridDataset {
|
|
|
839
835
|
this.updateDisplayedRows();
|
|
840
836
|
}
|
|
841
837
|
isExistingID(id) {
|
|
842
|
-
return (this.loadedKeys ?? [])
|
|
843
|
-
.map((key) => this.getRowID(key))
|
|
844
|
-
.indexOf(id) >= 0;
|
|
838
|
+
return (this.loadedKeys ?? []).map((key) => this.getRowID(key)).indexOf(id) >= 0;
|
|
845
839
|
}
|
|
846
840
|
updateDisplayedRows() {
|
|
847
|
-
const loadedKeys = (this.loadedKeys ?? [])
|
|
848
|
-
.filter((key) => this.idsToRemove.indexOf(this.getRowID(key)) < 0);
|
|
841
|
+
const loadedKeys = (this.loadedKeys ?? []).filter((key) => this.idsToRemove.indexOf(this.getRowID(key)) < 0);
|
|
849
842
|
this.displayedIDs = loadedKeys.map((key) => this.getRowID(key));
|
|
850
843
|
this.displayedIDs.push(...this._idsToAdd);
|
|
851
844
|
this.displayedRows = loadedKeys.map((key) => this.getRowData(key));
|
|
852
845
|
this.displayedRows.push(...this.addedRowData);
|
|
853
846
|
}
|
|
854
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
855
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
847
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectResultDataset, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
848
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectResultDataset });
|
|
856
849
|
}
|
|
857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectResultDataset, decorators: [{
|
|
858
851
|
type: Injectable
|
|
859
852
|
}] });
|
|
860
853
|
|
|
861
854
|
class FormGroupService {
|
|
862
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
863
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormGroupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
856
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormGroupService });
|
|
864
857
|
}
|
|
865
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormGroupService, decorators: [{
|
|
866
859
|
type: Injectable
|
|
867
860
|
}] });
|
|
868
861
|
|
|
869
862
|
class FormService {
|
|
870
863
|
//#region ViewChilds, Inputs, Outputs
|
|
871
864
|
fieldRefreshed = new EventEmitter();
|
|
872
|
-
modelRefreshed = new EventEmitter;
|
|
865
|
+
modelRefreshed = new EventEmitter();
|
|
873
866
|
//#endregion
|
|
874
867
|
//#region Variables
|
|
875
868
|
_loading = false;
|
|
@@ -925,7 +918,7 @@ class FormService {
|
|
|
925
918
|
beginFieldLoading(fieldName) {
|
|
926
919
|
this.fieldRefreshed.emit({
|
|
927
920
|
fieldName,
|
|
928
|
-
loading: true
|
|
921
|
+
loading: true,
|
|
929
922
|
});
|
|
930
923
|
}
|
|
931
924
|
cancelEdit() {
|
|
@@ -986,7 +979,9 @@ class FormService {
|
|
|
986
979
|
if (errorResponse.status === 400 && errorResponse.error && errorResponse.error.errors) {
|
|
987
980
|
const errors = errorResponse.error.errors;
|
|
988
981
|
Object.keys(errors)
|
|
989
|
-
.map((x) => {
|
|
982
|
+
.map((x) => {
|
|
983
|
+
return { key: x, field: x.substring(0, 1).toLocaleLowerCase() + x.substring(1, x.length) };
|
|
984
|
+
})
|
|
990
985
|
.forEach((err) => {
|
|
991
986
|
setTimeout(() => {
|
|
992
987
|
const field = this.form.get(err.field);
|
|
@@ -996,10 +991,10 @@ class FormService {
|
|
|
996
991
|
});
|
|
997
992
|
}
|
|
998
993
|
}
|
|
999
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1000
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
994
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
995
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormService });
|
|
1001
996
|
}
|
|
1002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormService, decorators: [{
|
|
1003
998
|
type: Injectable
|
|
1004
999
|
}] });
|
|
1005
1000
|
|
|
@@ -1101,8 +1096,8 @@ function toSidebarMenuOpenMode(value) {
|
|
|
1101
1096
|
}
|
|
1102
1097
|
if (typeof value === 'string') {
|
|
1103
1098
|
const normalized = value.toLowerCase();
|
|
1104
|
-
return ORDINAL_MODES.find((mode) => mode.toLowerCase() === normalized)
|
|
1105
|
-
|
|
1099
|
+
return (ORDINAL_MODES.find((mode) => mode.toLowerCase() === normalized) ??
|
|
1100
|
+
SidebarMenuOpenMode.Internal);
|
|
1106
1101
|
}
|
|
1107
1102
|
return SidebarMenuOpenMode.Internal;
|
|
1108
1103
|
}
|
|
@@ -1137,12 +1132,11 @@ class SidebarService {
|
|
|
1137
1132
|
}
|
|
1138
1133
|
loadChildren(parentMenu) {
|
|
1139
1134
|
this.childrenLoading.emit(parentMenu);
|
|
1140
|
-
this.loadChildrenFor(parentMenu)
|
|
1141
|
-
.subscribe({
|
|
1135
|
+
this.loadChildrenFor(parentMenu).subscribe({
|
|
1142
1136
|
error: (exception) => {
|
|
1143
1137
|
this.childrenFailed.emit(parentMenu);
|
|
1144
1138
|
throw exception;
|
|
1145
|
-
}
|
|
1139
|
+
},
|
|
1146
1140
|
});
|
|
1147
1141
|
}
|
|
1148
1142
|
/**
|
|
@@ -1151,15 +1145,13 @@ class SidebarService {
|
|
|
1151
1145
|
* the fire-and-forget variant that also raises the loading and failure events.
|
|
1152
1146
|
*/
|
|
1153
1147
|
loadChildrenFor(parentMenu) {
|
|
1154
|
-
return this.loadMenus(parentMenu)
|
|
1155
|
-
.pipe(take(1), map((menus) => menus.map((menu) => new SidebarMenu(menu))), tap((childrenMenus) => {
|
|
1148
|
+
return this.loadMenus(parentMenu).pipe(take(1), map((menus) => menus.map((menu) => new SidebarMenu(menu))), tap((childrenMenus) => {
|
|
1156
1149
|
parentMenu.children = childrenMenus;
|
|
1157
|
-
childrenMenus.forEach((childMenu) => childMenu.parent = parentMenu);
|
|
1150
|
+
childrenMenus.forEach((childMenu) => (childMenu.parent = parentMenu));
|
|
1158
1151
|
}));
|
|
1159
1152
|
}
|
|
1160
1153
|
loadRoot() {
|
|
1161
|
-
return this.loadMenus(null)
|
|
1162
|
-
.pipe(take(1), map((menus) => menus.map((menu) => new SidebarMenu(menu))), tap((menus) => this.menus = menus));
|
|
1154
|
+
return this.loadMenus(null).pipe(take(1), map((menus) => menus.map((menu) => new SidebarMenu(menu))), tap((menus) => (this.menus = menus)));
|
|
1163
1155
|
}
|
|
1164
1156
|
select(menu) {
|
|
1165
1157
|
if (menu.childCount > 0 && (menu.children?.length ?? 0) === 0) {
|
|
@@ -1230,13 +1222,13 @@ class SidebarService {
|
|
|
1230
1222
|
this.selectMenu(menu.parent);
|
|
1231
1223
|
}
|
|
1232
1224
|
}
|
|
1233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1234
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1226
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarService, providedIn: 'root' });
|
|
1235
1227
|
}
|
|
1236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarService, decorators: [{
|
|
1237
1229
|
type: Injectable,
|
|
1238
1230
|
args: [{
|
|
1239
|
-
providedIn: 'root'
|
|
1231
|
+
providedIn: 'root',
|
|
1240
1232
|
}]
|
|
1241
1233
|
}] });
|
|
1242
1234
|
|
|
@@ -1275,15 +1267,10 @@ class FormInputComponent extends BaseComponent {
|
|
|
1275
1267
|
//#endregion
|
|
1276
1268
|
//#region Properties
|
|
1277
1269
|
get formControl() {
|
|
1278
|
-
return this.controlName
|
|
1279
|
-
? this.formGroup.get(this.controlName)
|
|
1280
|
-
: null;
|
|
1270
|
+
return this.controlName ? this.formGroup.get(this.controlName) : null;
|
|
1281
1271
|
}
|
|
1282
1272
|
get formControlName() {
|
|
1283
|
-
return [
|
|
1284
|
-
...this.parentGroups,
|
|
1285
|
-
this.controlName,
|
|
1286
|
-
].join('.');
|
|
1273
|
+
return [...this.parentGroups, this.controlName].join('.');
|
|
1287
1274
|
}
|
|
1288
1275
|
get formGroup() {
|
|
1289
1276
|
let formGroup = this.formGroupDirective.form;
|
|
@@ -1322,9 +1309,7 @@ class FormInputComponent extends BaseComponent {
|
|
|
1322
1309
|
switch (this.type) {
|
|
1323
1310
|
case 'number':
|
|
1324
1311
|
if (this.formControl) {
|
|
1325
|
-
this.formControl.valueChanges
|
|
1326
|
-
.pipe(takeUntil(this.destroy$))
|
|
1327
|
-
.subscribe((value) => {
|
|
1312
|
+
this.formControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1328
1313
|
if (value !== null && value === '') {
|
|
1329
1314
|
this.formControl?.setValue(null);
|
|
1330
1315
|
}
|
|
@@ -1336,9 +1321,7 @@ class FormInputComponent extends BaseComponent {
|
|
|
1336
1321
|
this.format = 'yyyy-MM-dd';
|
|
1337
1322
|
}
|
|
1338
1323
|
if (this.formControl) {
|
|
1339
|
-
this.formControl.valueChanges
|
|
1340
|
-
.pipe(takeUntil(this.destroy$))
|
|
1341
|
-
.subscribe((value) => {
|
|
1324
|
+
this.formControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1342
1325
|
if (value !== null) {
|
|
1343
1326
|
try {
|
|
1344
1327
|
if (value !== formatDate(value, 'yyyy-MM-dd', 'en')) {
|
|
@@ -1372,24 +1355,17 @@ class FormInputComponent extends BaseComponent {
|
|
|
1372
1355
|
this.fixedValue = newText;
|
|
1373
1356
|
this.fixedValueChanged.emit(this.fixedValue);
|
|
1374
1357
|
}
|
|
1375
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1376
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.6", type: FormInputComponent, isStandalone: true, selector: "lib-form-input", inputs: { autofocus: "autofocus", controlName: "controlName", disabledControlName: "disabledControlName", displayReadOnlyAsDisabled: "displayReadOnlyAsDisabled", fixedValue: "fixedValue", format: "format", invalid: "invalid", isDisabled: "isDisabled", isFullHeight: "isFullHeight", maxLength: "maxLength", min: "min", readOnly: "readOnly", rows: "rows", step: "step", type: "type" }, outputs: { blurred: "blurred", changed: "changed", fixedValueChanged: "fixedValueChanged", focused: "focused", inputChanged: "inputChanged" }, host: { properties: { "class.full-height": "isFullHeight", "attr.type": "null" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"formGroupDirective.form?.enabled || isFormEditMode;else disabledControl\">\n <ng-container [ngSwitch]=\"type\">\n \n <textarea *ngSwitchCase=\"'textarea'\"\n \n [attr.maxLength]=\"maxLength ?? null\"\n [attr.rows]=\"rows\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\">\n </textarea>\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <input *ngIf=\"isFormControl; else fixedCheckbox\"\n class=\"switch\"\n type=\"checkbox\"\n \n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\" />\n\n <ng-template #fixedCheckbox>\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\" />\n </ng-template>\n </ng-container>\n\n\n <ng-container *ngSwitchDefault>\n <input *ngIf=\"isFormControl; else fixedTextBox\"\n \n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [formControlName]=\"controlName\"\n [type]=\"type\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\" />\n\n <ng-template #fixedTextBox>\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"type === 'date' || type === 'datetime-local' ? (fixedValue | date: format) : ( type === 'number' ? (fixedValue | number) : fixedValue )\" \n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\" />\n </ng-template>\n </ng-container>\n\n </ng-container>\n</ng-container>\n\n<ng-template #disabledControl>\n <ng-container [ngSwitch]=\"type\">\n <span class=\"value\" *ngSwitchCase=\"'checkbox'\">\n <i [ngClass]=\"fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value ? 'fa-solid fa-square-check' : 'fa-regular fa-square'\"></i>\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'date'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'datetime-local'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'number'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | number: format }}\n </span>\n\n <span class=\"value text\" *ngSwitchDefault>{{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value }}</span>\n </ng-container>\n</ng-template>\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\">\n \n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}input:focus,textarea:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 107 182 / .3) }input,textarea{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}input:invalid,textarea:invalid{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;border-radius:.375rem;padding:.25rem .5rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:-2.25rem;padding-right:2.25rem;transition-property:none}input[type=text].ng-invalid.ng-touched:focus,input[type=text].invalid:focus,input[type=number].ng-invalid.ng-touched:focus,input[type=number].invalid:focus,input[type=password].ng-invalid.ng-touched:focus,input[type=password].invalid:focus,input[type=date].ng-invalid.ng-touched:focus,input[type=date].invalid:focus,input[type=datetime-local].ng-invalid.ng-touched:focus,input[type=datetime-local].invalid:focus,input[type=email].ng-invalid.ng-touched:focus,input[type=email].invalid:focus,input[type=file].ng-invalid.ng-touched:focus,input[type=file].invalid:focus,input[type=month].ng-invalid.ng-touched:focus,input[type=month].invalid:focus,input[type=tel].ng-invalid.ng-touched:focus,input[type=tel].invalid:focus,input[type=time].ng-invalid.ng-touched:focus,input[type=time].invalid:focus,input[type=url].ng-invalid.ng-touched:focus,input[type=url].invalid:focus,input[type=week].ng-invalid.ng-touched:focus,input[type=week].invalid:focus,textarea.ng-invalid.ng-touched:focus,textarea.invalid:focus{--tw-ring-color: rgb(248 113 113 / .3) }input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-top:.25rem;margin-bottom:.25rem;height:1.25rem;width:1.25rem;border-radius:.25rem;padding:.125rem;display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox]:disabled{pointer-events:none;opacity:.5}input[type=checkbox]:not(.switch){border-width:2px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}input[type=checkbox]:not(.switch):before{border-radius:.25rem;--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:.25rem;font-family:\"Font Awesome 6 Free\";font-weight:900}input[type=checkbox]:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}input[type=checkbox]:disabled~label{opacity:.5}input[type=checkbox]~label{margin-left:.5rem;-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:1.5rem;width:3rem;border-radius:2rem;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:9999px;--tw-content: \"\";content:var(--tw-content);background-color:#6b728099}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus:before{background-color:#3b82f699}input[type=checkbox].switch:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;overflow-wrap:break-word;padding-top:.25rem;padding-bottom:.25rem}label.text,.value.text{white-space:pre-wrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }] });
|
|
1358
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: FormInputComponent, isStandalone: true, selector: "lib-form-input", inputs: { autofocus: "autofocus", controlName: "controlName", disabledControlName: "disabledControlName", displayReadOnlyAsDisabled: "displayReadOnlyAsDisabled", fixedValue: "fixedValue", format: "format", invalid: "invalid", isDisabled: "isDisabled", isFullHeight: "isFullHeight", maxLength: "maxLength", min: "min", readOnly: "readOnly", rows: "rows", step: "step", type: "type" }, outputs: { blurred: "blurred", changed: "changed", fixedValueChanged: "fixedValueChanged", focused: "focused", inputChanged: "inputChanged" }, host: { properties: { "class.full-height": "isFullHeight", "attr.type": "null" } }, usesInheritance: true, ngImport: i0, template: "@if (formGroupDirective.form?.enabled || isFormEditMode) {\n @switch (type) {\n @case ('textarea') {\n <textarea\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.rows]=\"rows\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n ></textarea>\n }\n @case ('checkbox') {\n @if (isFormControl) {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n @default {\n @if (isFormControl) {\n <input\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [formControlName]=\"controlName\"\n [type]=\"type\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"\n type === 'date' || type === 'datetime-local'\n ? (fixedValue | date: format)\n : type === 'number'\n ? (fixedValue | number)\n : fixedValue\n \"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n }\n} @else {\n @switch (type) {\n @case ('checkbox') {\n <span class=\"value\">\n <i\n [ngClass]=\"\n (fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value)\n ? 'fa-solid fa-square-check'\n : 'fa-regular fa-square'\n \"\n ></i>\n </span>\n }\n @case ('date') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n }\n @case ('datetime-local') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n }\n @case ('number') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | number: format }}\n </span>\n }\n @default {\n <span class=\"value text\">{{\n fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value\n }}</span>\n }\n }\n}\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\"> </ng-template>\n", styles: [":host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}input:focus,textarea:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 107 182 / .3) }input,textarea{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}input:invalid,textarea:invalid{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;border-radius:.375rem;padding:.25rem .5rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:-2.25rem;padding-right:2.25rem;transition-property:none}input[type=text].ng-invalid.ng-touched:focus,input[type=text].invalid:focus,input[type=number].ng-invalid.ng-touched:focus,input[type=number].invalid:focus,input[type=password].ng-invalid.ng-touched:focus,input[type=password].invalid:focus,input[type=date].ng-invalid.ng-touched:focus,input[type=date].invalid:focus,input[type=datetime-local].ng-invalid.ng-touched:focus,input[type=datetime-local].invalid:focus,input[type=email].ng-invalid.ng-touched:focus,input[type=email].invalid:focus,input[type=file].ng-invalid.ng-touched:focus,input[type=file].invalid:focus,input[type=month].ng-invalid.ng-touched:focus,input[type=month].invalid:focus,input[type=tel].ng-invalid.ng-touched:focus,input[type=tel].invalid:focus,input[type=time].ng-invalid.ng-touched:focus,input[type=time].invalid:focus,input[type=url].ng-invalid.ng-touched:focus,input[type=url].invalid:focus,input[type=week].ng-invalid.ng-touched:focus,input[type=week].invalid:focus,textarea.ng-invalid.ng-touched:focus,textarea.invalid:focus{--tw-ring-color: rgb(248 113 113 / .3) }input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-top:.25rem;margin-bottom:.25rem;height:1.25rem;width:1.25rem;border-radius:.25rem;padding:.125rem;display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox]:disabled{pointer-events:none;opacity:.5}input[type=checkbox]:not(.switch){border-width:2px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}input[type=checkbox]:not(.switch):before{border-radius:.25rem;--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:.25rem;font-family:\"Font Awesome 6 Free\";font-weight:900}input[type=checkbox]:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}input[type=checkbox]:disabled~label{opacity:.5}input[type=checkbox]~label{margin-left:.5rem;-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:1.5rem;width:3rem;border-radius:2rem;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:9999px;--tw-content: \"\";content:var(--tw-content);background-color:#6b728099}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus:before{background-color:#3b82f699}input[type=checkbox].switch:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;overflow-wrap:break-word;padding-top:.25rem;padding-bottom:.25rem}label.text,.value.text{white-space:pre-wrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1377
1360
|
}
|
|
1378
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormInputComponent, decorators: [{
|
|
1379
1362
|
type: Component,
|
|
1380
|
-
args: [{ selector: 'lib-form-input', imports: [
|
|
1381
|
-
CommonModule,
|
|
1382
|
-
FormsModule,
|
|
1383
|
-
NgIf,
|
|
1384
|
-
NgSwitch,
|
|
1385
|
-
NgSwitchCase,
|
|
1386
|
-
ReactiveFormsModule,
|
|
1387
|
-
], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }], host: {
|
|
1363
|
+
args: [{ selector: 'lib-form-input', imports: [CommonModule, FormsModule, ReactiveFormsModule], viewProviders: [{ provide: ControlContainer, useExisting: FormGroupDirective }], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
1388
1364
|
'[class.full-height]': 'isFullHeight',
|
|
1389
1365
|
// Clears a stray `type` attribute for the same reason as FormInputGroupComponent — see the
|
|
1390
1366
|
// comment there. Applies when a consumer sets `type` on `lib-form-input` directly.
|
|
1391
|
-
'[attr.type]': 'null'
|
|
1392
|
-
}, template: "<ng-container *ngIf=\"formGroupDirective.form?.enabled || isFormEditMode;else disabledControl\">\n <ng-container [ngSwitch]=\"type\">\n \n <textarea *ngSwitchCase=\"'textarea'\"\n \n [attr.maxLength]=\"maxLength ?? null\"\n [attr.rows]=\"rows\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\">\n </textarea>\n\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <input *ngIf=\"isFormControl; else fixedCheckbox\"\n class=\"switch\"\n type=\"checkbox\"\n \n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\" />\n\n <ng-template #fixedCheckbox>\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\" />\n </ng-template>\n </ng-container>\n\n\n <ng-container *ngSwitchDefault>\n <input *ngIf=\"isFormControl; else fixedTextBox\"\n \n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [formControlName]=\"controlName\"\n [type]=\"type\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\" />\n\n <ng-template #fixedTextBox>\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"type === 'date' || type === 'datetime-local' ? (fixedValue | date: format) : ( type === 'number' ? (fixedValue | number) : fixedValue )\" \n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\" />\n </ng-template>\n </ng-container>\n\n </ng-container>\n</ng-container>\n\n<ng-template #disabledControl>\n <ng-container [ngSwitch]=\"type\">\n <span class=\"value\" *ngSwitchCase=\"'checkbox'\">\n <i [ngClass]=\"fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value ? 'fa-solid fa-square-check' : 'fa-regular fa-square'\"></i>\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'date'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'datetime-local'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n\n <span class=\"value\" *ngSwitchCase=\"'number'\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | number: format }}\n </span>\n\n <span class=\"value text\" *ngSwitchDefault>{{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value }}</span>\n </ng-container>\n</ng-template>\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\">\n \n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}input:focus,textarea:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 107 182 / .3) }input,textarea{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}input:invalid,textarea:invalid{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;border-radius:.375rem;padding:.25rem .5rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:-2.25rem;padding-right:2.25rem;transition-property:none}input[type=text].ng-invalid.ng-touched:focus,input[type=text].invalid:focus,input[type=number].ng-invalid.ng-touched:focus,input[type=number].invalid:focus,input[type=password].ng-invalid.ng-touched:focus,input[type=password].invalid:focus,input[type=date].ng-invalid.ng-touched:focus,input[type=date].invalid:focus,input[type=datetime-local].ng-invalid.ng-touched:focus,input[type=datetime-local].invalid:focus,input[type=email].ng-invalid.ng-touched:focus,input[type=email].invalid:focus,input[type=file].ng-invalid.ng-touched:focus,input[type=file].invalid:focus,input[type=month].ng-invalid.ng-touched:focus,input[type=month].invalid:focus,input[type=tel].ng-invalid.ng-touched:focus,input[type=tel].invalid:focus,input[type=time].ng-invalid.ng-touched:focus,input[type=time].invalid:focus,input[type=url].ng-invalid.ng-touched:focus,input[type=url].invalid:focus,input[type=week].ng-invalid.ng-touched:focus,input[type=week].invalid:focus,textarea.ng-invalid.ng-touched:focus,textarea.invalid:focus{--tw-ring-color: rgb(248 113 113 / .3) }input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-top:.25rem;margin-bottom:.25rem;height:1.25rem;width:1.25rem;border-radius:.25rem;padding:.125rem;display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox]:disabled{pointer-events:none;opacity:.5}input[type=checkbox]:not(.switch){border-width:2px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}input[type=checkbox]:not(.switch):before{border-radius:.25rem;--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:.25rem;font-family:\"Font Awesome 6 Free\";font-weight:900}input[type=checkbox]:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}input[type=checkbox]:disabled~label{opacity:.5}input[type=checkbox]~label{margin-left:.5rem;-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:1.5rem;width:3rem;border-radius:2rem;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:9999px;--tw-content: \"\";content:var(--tw-content);background-color:#6b728099}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus:before{background-color:#3b82f699}input[type=checkbox].switch:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;overflow-wrap:break-word;padding-top:.25rem;padding-bottom:.25rem}label.text,.value.text{white-space:pre-wrap}\n"] }]
|
|
1367
|
+
'[attr.type]': 'null',
|
|
1368
|
+
}, template: "@if (formGroupDirective.form?.enabled || isFormEditMode) {\n @switch (type) {\n @case ('textarea') {\n <textarea\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.rows]=\"rows\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n ></textarea>\n }\n @case ('checkbox') {\n @if (isFormControl) {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [class.invalid]=\"invalid\"\n [formControlName]=\"controlName\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n class=\"switch\"\n type=\"checkbox\"\n [(ngModel)]=\"fixedValue\"\n [attr.readonly]=\"true\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n @default {\n @if (isFormControl) {\n <input\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"readOnly ? true : null\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [formControlName]=\"controlName\"\n [type]=\"type\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n />\n } @else {\n <input\n type=\"text\"\n [attr.maxLength]=\"maxLength ?? null\"\n [attr.min]=\"minAttributeValue\"\n [attr.readonly]=\"true\"\n [attr.step]=\"stepAttributeValue\"\n [class.invalid]=\"invalid\"\n [class.readonly-as-disabled]=\"displayReadOnlyAsDisabled\"\n [disabled]=\"isDisabled\"\n [ngModel]=\"\n type === 'date' || type === 'datetime-local'\n ? (fixedValue | date: format)\n : type === 'number'\n ? (fixedValue | number)\n : fixedValue\n \"\n [ngModelOptions]=\"{ standalone: true }\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n (input)=\"onInput()\"\n (ngModelChange)=\"onValueChanged($event)\"\n />\n }\n }\n }\n} @else {\n @switch (type) {\n @case ('checkbox') {\n <span class=\"value\">\n <i\n [ngClass]=\"\n (fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value)\n ? 'fa-solid fa-square-check'\n : 'fa-regular fa-square'\n \"\n ></i>\n </span>\n }\n @case ('date') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n }\n @case ('datetime-local') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | date: format }}\n </span>\n }\n @case ('number') {\n <span class=\"value\">\n {{ fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value | number: format }}\n </span>\n }\n @default {\n <span class=\"value text\">{{\n fixedValue ?? formGroupDirective.form.get(disabledControlName ?? controlName)?.value\n }}</span>\n }\n }\n}\n\n<ng-template #fixedTextbox let-fixedValue=\"fixedValue\"> </ng-template>\n", styles: [":host{display:block}:host.full-height{height:100%}:host.full-height textarea{height:100%}input,textarea{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}input:focus,textarea:focus{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 107 182 / .3) }input,textarea{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}input:invalid,textarea:invalid{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}input:disabled,input.readonly-as-disabled[readonly],textarea:disabled,textarea.readonly-as-disabled[readonly]{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}input.ng-invalid.ng-touched,input.invalid,textarea.ng-invalid.ng-touched,textarea.invalid{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}input[type=text],input[type=number],input[type=password],input[type=date],input[type=datetime-local],input[type=email],input[type=file],input[type=month],input[type=tel],input[type=time],input[type=url],input[type=week],textarea{display:block;width:100%;border-radius:.375rem;padding:.25rem .5rem;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{margin-right:-2.25rem;padding-right:2.25rem;transition-property:none}input[type=text].ng-invalid.ng-touched:focus,input[type=text].invalid:focus,input[type=number].ng-invalid.ng-touched:focus,input[type=number].invalid:focus,input[type=password].ng-invalid.ng-touched:focus,input[type=password].invalid:focus,input[type=date].ng-invalid.ng-touched:focus,input[type=date].invalid:focus,input[type=datetime-local].ng-invalid.ng-touched:focus,input[type=datetime-local].invalid:focus,input[type=email].ng-invalid.ng-touched:focus,input[type=email].invalid:focus,input[type=file].ng-invalid.ng-touched:focus,input[type=file].invalid:focus,input[type=month].ng-invalid.ng-touched:focus,input[type=month].invalid:focus,input[type=tel].ng-invalid.ng-touched:focus,input[type=tel].invalid:focus,input[type=time].ng-invalid.ng-touched:focus,input[type=time].invalid:focus,input[type=url].ng-invalid.ng-touched:focus,input[type=url].invalid:focus,input[type=week].ng-invalid.ng-touched:focus,input[type=week].invalid:focus,textarea.ng-invalid.ng-touched:focus,textarea.invalid:focus{--tw-ring-color: rgb(248 113 113 / .3) }input[type=text].ng-invalid.ng-touched,input[type=text].invalid,input[type=number].ng-invalid.ng-touched,input[type=number].invalid,input[type=password].ng-invalid.ng-touched,input[type=password].invalid,input[type=date].ng-invalid.ng-touched,input[type=date].invalid,input[type=datetime-local].ng-invalid.ng-touched,input[type=datetime-local].invalid,input[type=email].ng-invalid.ng-touched,input[type=email].invalid,input[type=file].ng-invalid.ng-touched,input[type=file].invalid,input[type=month].ng-invalid.ng-touched,input[type=month].invalid,input[type=tel].ng-invalid.ng-touched,input[type=tel].invalid,input[type=time].ng-invalid.ng-touched,input[type=time].invalid,input[type=url].ng-invalid.ng-touched,input[type=url].invalid,input[type=week].ng-invalid.ng-touched,input[type=week].invalid,textarea.ng-invalid.ng-touched,textarea.invalid{background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;background-image:url(\"data:image/svg+xml,%3csvg class='text-white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e\")}input[type=checkbox]{position:relative;margin-top:.25rem;margin-bottom:.25rem;height:1.25rem;width:1.25rem;border-radius:.25rem;padding:.125rem;display:inline-flex;flex-direction:row;justify-content:flex-end;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox]:disabled{pointer-events:none;opacity:.5}input[type=checkbox]:not(.switch){border-width:2px;--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}input[type=checkbox]:not(.switch):focus{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}input[type=checkbox]:not(.switch):before{border-radius:.25rem;--tw-content: \"\";content:var(--tw-content);position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:.25rem;font-family:\"Font Awesome 6 Free\";font-weight:900}input[type=checkbox]:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox]:checked:before{--tw-content: \"\\f00c\";content:var(--tw-content);--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}input[type=checkbox]:disabled~label{opacity:.5}input[type=checkbox]~label{margin-left:.5rem;-webkit-user-select:none;user-select:none}input[type=checkbox].switch{height:1.5rem;width:3rem;border-radius:2rem;appearance:none;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:before{aspect-ratio:1 / 1;height:100%;border-radius:9999px;--tw-content: \"\";content:var(--tw-content);background-color:#6b728099}input[type=checkbox].switch:after{flex-grow:1;--tw-content: \"\";content:var(--tw-content);transition:flex-grow .15s ease-in-out}input[type=checkbox].switch:focus:before{background-color:#3b82f699}input[type=checkbox].switch:checked{border-color:#006bb6cc;--tw-bg-opacity: 1;background-color:rgb(0 107 182 / var(--tw-bg-opacity, 1));background-image:none}input[type=checkbox].switch:checked:before{--tw-content: \"\";content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}input[type=checkbox].switch:checked:after{flex-grow:0}label,.value{display:block;overflow-wrap:break-word;padding-top:.25rem;padding-bottom:.25rem}label.text,.value.text{white-space:pre-wrap}\n"] }]
|
|
1393
1369
|
}], ctorParameters: () => [], propDecorators: { autofocus: [{
|
|
1394
1370
|
type: Input
|
|
1395
1371
|
}], controlName: [{
|
|
@@ -1463,9 +1439,7 @@ class FormInputGroupComponent extends BaseComponent {
|
|
|
1463
1439
|
//#endregion
|
|
1464
1440
|
//#region Properties
|
|
1465
1441
|
get formControl() {
|
|
1466
|
-
return this.controlName
|
|
1467
|
-
? this.formGroup.get(this.controlName)
|
|
1468
|
-
: null;
|
|
1442
|
+
return this.controlName ? this.formGroup.get(this.controlName) : null;
|
|
1469
1443
|
}
|
|
1470
1444
|
get formGroup() {
|
|
1471
1445
|
let formGroup = this.formGroupDirective.form;
|
|
@@ -1486,14 +1460,10 @@ class FormInputGroupComponent extends BaseComponent {
|
|
|
1486
1460
|
super();
|
|
1487
1461
|
}
|
|
1488
1462
|
ngOnInit() {
|
|
1489
|
-
this.formControl?.statusChanges
|
|
1490
|
-
.pipe(takeUntil(this.destroy$))
|
|
1491
|
-
.subscribe(() => {
|
|
1463
|
+
this.formControl?.statusChanges.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1492
1464
|
this.loadingField = false;
|
|
1493
1465
|
});
|
|
1494
|
-
this.formControl?.valueChanges
|
|
1495
|
-
.pipe(takeUntil(this.destroy$))
|
|
1496
|
-
.subscribe(() => {
|
|
1466
|
+
this.formControl?.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1497
1467
|
this.loadingField = false;
|
|
1498
1468
|
});
|
|
1499
1469
|
this.formService.fieldRefreshed
|
|
@@ -1509,28 +1479,20 @@ class FormInputGroupComponent extends BaseComponent {
|
|
|
1509
1479
|
hasValidation(errorKey) {
|
|
1510
1480
|
return Object.keys(this.validations).indexOf(errorKey) >= 0;
|
|
1511
1481
|
}
|
|
1512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1513
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1482
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormInputGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1483
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: FormInputGroupComponent, isStandalone: true, selector: "lib-form-input-group", inputs: { autofocus: "autofocus", alignContent: "alignContent", controlName: "controlName", fixedValue: "fixedValue", format: "format", label: "label", isDisabled: "isDisabled", isFullHeight: "isFullHeight", maxLength: "maxLength", min: "min", notes: "notes", readOnly: "readOnly", rows: "rows", showLabel: "showLabel", step: "step", template: "template", type: "type", validations: "validations" }, host: { properties: { "class.full-height": "isFullHeight", "attr.type": "null" } }, usesInheritance: true, ngImport: i0, template: "@if (showLabel) {\n <label [attr.for]=\"controlName\"> {{ label | translate }}: </label>\n}\n\n<div class=\"field\" [class.col-span-2]=\"!showLabel\" [ngStyle]=\"{ 'align-content': alignContent }\">\n @if (loadingField || (formService.loading && formService.model === null)) {\n <div class=\"loading\">\n <div></div>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"template ? template : defaultTemplate\"> </ng-container>\n @if (formControl?.touched) {\n <div class=\"validations\" [class.show]=\"formControl?.invalid\">\n @for (error of $safeNavigationMigration(formControl?.errors) | keyvalue; track error) {\n @if (hasValidation(error.key)) {\n <span>{{ validations[error.key] | translate }}</span>\n }\n <ng-template #defaultValidationError>{{ error.key }}</ng-template>\n }\n </div>\n }\n <ng-template #defaultTemplate>\n <lib-form-input\n #formInput\n [autofocus]=\"autofocus\"\n [controlName]=\"controlName\"\n [fixedValue]=\"fixedValue\"\n [format]=\"format\"\n [isDisabled]=\"isDisabled\"\n [isFullHeight]=\"isFullHeight\"\n [min]=\"min\"\n [maxLength]=\"maxLength\"\n [readOnly]=\"readOnly\"\n [rows]=\"rows\"\n [step]=\"step\"\n [type]=\"type\"\n >\n </lib-form-input>\n </ng-template>\n @if (hasNotes) {\n <span class=\"text-sm italic\"> *{{ notes | translate }} </span>\n }\n }\n</div>\n", styles: [":host{grid-column:span 2 / span 2;display:grid;grid-template-columns:subgrid;gap:.75rem}:host.full-height{max-height:100%;overflow:auto}label{white-space:nowrap;padding-top:.25rem;padding-bottom:.25rem;text-align:right;font-size:.75rem;font-weight:700;text-transform:uppercase;line-height:1.5rem;letter-spacing:.025em;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.field .validations{flex-basis:100%;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.field .validations.show{margin-top:.25rem}.field .validations span{display:block}.field .loading{max-width:24rem}@keyframes pulse{50%{opacity:.5}}.field .loading{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.field .loading *{height:.625rem;width:100%;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}@media(prefers-color-scheme:dark){.field .loading *{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}}\n"], dependencies: [{ kind: "component", type: FormInputComponent, selector: "lib-form-input", inputs: ["autofocus", "controlName", "disabledControlName", "displayReadOnlyAsDisabled", "fixedValue", "format", "invalid", "isDisabled", "isFullHeight", "maxLength", "min", "readOnly", "rows", "step", "type"], outputs: ["blurred", "changed", "fixedValueChanged", "focused", "inputChanged"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
1514
1484
|
}
|
|
1515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormInputGroupComponent, decorators: [{
|
|
1516
1486
|
type: Component,
|
|
1517
|
-
args: [{ selector: 'lib-form-input-group', imports: [
|
|
1518
|
-
FormInputComponent,
|
|
1519
|
-
KeyValuePipe,
|
|
1520
|
-
NgFor,
|
|
1521
|
-
NgIf,
|
|
1522
|
-
NgStyle,
|
|
1523
|
-
NgTemplateOutlet,
|
|
1524
|
-
TranslatePipe,
|
|
1525
|
-
], host: {
|
|
1487
|
+
args: [{ selector: 'lib-form-input-group', imports: [FormInputComponent, KeyValuePipe, NgStyle, NgTemplateOutlet, TranslatePipe], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
1526
1488
|
'[class.full-height]': 'isFullHeight',
|
|
1527
1489
|
// Angular keeps static attributes in the DOM even when a directive consumes them as an
|
|
1528
1490
|
// @Input(), so `type="checkbox"` would linger on this host element — where
|
|
1529
1491
|
// @tailwindcss/forms' tag-agnostic `[type="checkbox"]` base rules style the host itself as
|
|
1530
1492
|
// a checkbox (1px border, white fill, height:1rem). Clearing the attribute removes the
|
|
1531
1493
|
// stray box for every type while leaving the `type` @Input() untouched.
|
|
1532
|
-
'[attr.type]': 'null'
|
|
1533
|
-
}, template: "
|
|
1494
|
+
'[attr.type]': 'null',
|
|
1495
|
+
}, template: "@if (showLabel) {\n <label [attr.for]=\"controlName\"> {{ label | translate }}: </label>\n}\n\n<div class=\"field\" [class.col-span-2]=\"!showLabel\" [ngStyle]=\"{ 'align-content': alignContent }\">\n @if (loadingField || (formService.loading && formService.model === null)) {\n <div class=\"loading\">\n <div></div>\n </div>\n } @else {\n <ng-container *ngTemplateOutlet=\"template ? template : defaultTemplate\"> </ng-container>\n @if (formControl?.touched) {\n <div class=\"validations\" [class.show]=\"formControl?.invalid\">\n @for (error of $safeNavigationMigration(formControl?.errors) | keyvalue; track error) {\n @if (hasValidation(error.key)) {\n <span>{{ validations[error.key] | translate }}</span>\n }\n <ng-template #defaultValidationError>{{ error.key }}</ng-template>\n }\n </div>\n }\n <ng-template #defaultTemplate>\n <lib-form-input\n #formInput\n [autofocus]=\"autofocus\"\n [controlName]=\"controlName\"\n [fixedValue]=\"fixedValue\"\n [format]=\"format\"\n [isDisabled]=\"isDisabled\"\n [isFullHeight]=\"isFullHeight\"\n [min]=\"min\"\n [maxLength]=\"maxLength\"\n [readOnly]=\"readOnly\"\n [rows]=\"rows\"\n [step]=\"step\"\n [type]=\"type\"\n >\n </lib-form-input>\n </ng-template>\n @if (hasNotes) {\n <span class=\"text-sm italic\"> *{{ notes | translate }} </span>\n }\n }\n</div>\n", styles: [":host{grid-column:span 2 / span 2;display:grid;grid-template-columns:subgrid;gap:.75rem}:host.full-height{max-height:100%;overflow:auto}label{white-space:nowrap;padding-top:.25rem;padding-bottom:.25rem;text-align:right;font-size:.75rem;font-weight:700;text-transform:uppercase;line-height:1.5rem;letter-spacing:.025em;--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.field .validations{flex-basis:100%;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.field .validations.show{margin-top:.25rem}.field .validations span{display:block}.field .loading{max-width:24rem}@keyframes pulse{50%{opacity:.5}}.field .loading{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.field .loading *{height:.625rem;width:100%;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}@media(prefers-color-scheme:dark){.field .loading *{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}}\n"] }]
|
|
1534
1496
|
}], ctorParameters: () => [], propDecorators: { autofocus: [{
|
|
1535
1497
|
type: Input
|
|
1536
1498
|
}], alignContent: [{
|
|
@@ -1668,16 +1630,10 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1668
1630
|
return this.formGroup.form.get(this.formControlName);
|
|
1669
1631
|
}
|
|
1670
1632
|
get formControlName() {
|
|
1671
|
-
return [
|
|
1672
|
-
...this.formGroupName?.path ?? [],
|
|
1673
|
-
this.controlName
|
|
1674
|
-
].join('.');
|
|
1633
|
+
return [...(this.formGroupName?.path ?? []), this.controlName].join('.');
|
|
1675
1634
|
}
|
|
1676
1635
|
get formDisplayControlName() {
|
|
1677
|
-
return [
|
|
1678
|
-
...this.formGroupName?.path ?? [],
|
|
1679
|
-
this.displayControlName
|
|
1680
|
-
].join('.');
|
|
1636
|
+
return [...(this.formGroupName?.path ?? []), this.displayControlName].join('.');
|
|
1681
1637
|
}
|
|
1682
1638
|
get isInvalid() {
|
|
1683
1639
|
return this.formControl.invalid;
|
|
@@ -1737,9 +1693,7 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1737
1693
|
this.filterDiffer = this.keyValueDiffers.find(this._filters).create();
|
|
1738
1694
|
// Subscribe to changes in the form control to update the selected value and display control states.
|
|
1739
1695
|
this.syncFormControlsEnabledDisabled();
|
|
1740
|
-
this.formControl?.valueChanges
|
|
1741
|
-
.pipe(takeUntil(this.destroy$))
|
|
1742
|
-
.subscribe((value) => {
|
|
1696
|
+
this.formControl?.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1743
1697
|
this.syncFormControlsEnabledDisabled();
|
|
1744
1698
|
if (!this.shouldRefreshDisplay(value)) {
|
|
1745
1699
|
return;
|
|
@@ -1764,17 +1718,18 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1764
1718
|
this.isFocused = false;
|
|
1765
1719
|
}
|
|
1766
1720
|
onContainerClick() {
|
|
1767
|
-
if ((!this.isDropDownShown || this.readOnly)
|
|
1768
|
-
|
|
1769
|
-
|
|
1721
|
+
if ((!this.isDropDownShown || this.readOnly) &&
|
|
1722
|
+
(this.formGroup.form?.enabled ?? false) &&
|
|
1723
|
+
(this.formGroup.form?.get(this.formControlName)?.enabled ?? false)) {
|
|
1770
1724
|
this.openDropdownOverlay();
|
|
1771
1725
|
}
|
|
1772
1726
|
}
|
|
1773
1727
|
onContainerFocus() {
|
|
1774
1728
|
this.isFocused = true;
|
|
1775
|
-
if (!this.isDropDownShown &&
|
|
1776
|
-
|
|
1777
|
-
|
|
1729
|
+
if (!this.isDropDownShown &&
|
|
1730
|
+
!this.readOnly &&
|
|
1731
|
+
(this.formGroup.form?.enabled ?? false) &&
|
|
1732
|
+
(this.formGroup.form?.get(this.formControlName)?.enabled ?? false)) {
|
|
1778
1733
|
this.openDropdownOverlay();
|
|
1779
1734
|
}
|
|
1780
1735
|
}
|
|
@@ -1898,9 +1853,8 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1898
1853
|
const display = entry[this.displayProperty];
|
|
1899
1854
|
if (display instanceof Observable) {
|
|
1900
1855
|
this.entriesDataSource.push({ value: value, display: 'Loading...' });
|
|
1901
|
-
observables.push(display
|
|
1902
|
-
.
|
|
1903
|
-
this.entriesDataSource.filter(x => x.value === value)[0].display = v;
|
|
1856
|
+
observables.push(display.pipe(take(1), tap((v) => {
|
|
1857
|
+
this.entriesDataSource.filter((x) => x.value === value)[0].display = v;
|
|
1904
1858
|
if (this.selectedValue === value) {
|
|
1905
1859
|
this.displayControl.setValue(v);
|
|
1906
1860
|
}
|
|
@@ -1911,9 +1865,7 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1911
1865
|
}
|
|
1912
1866
|
});
|
|
1913
1867
|
// Subscribed only to run the requests; the emitted values are not needed here.
|
|
1914
|
-
forkJoin(observables)
|
|
1915
|
-
.pipe(take(1))
|
|
1916
|
-
.subscribe();
|
|
1868
|
+
forkJoin(observables).pipe(take(1)).subscribe();
|
|
1917
1869
|
}
|
|
1918
1870
|
initializeSearch() {
|
|
1919
1871
|
this.searchSubject
|
|
@@ -1929,9 +1881,11 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1929
1881
|
if (this.showMinimumCharactersMessage) {
|
|
1930
1882
|
return of(null).pipe(take(1));
|
|
1931
1883
|
}
|
|
1932
|
-
return this.catalogService
|
|
1884
|
+
return this.catalogService
|
|
1885
|
+
.search(this.searchEndpoint, this.maxEntries, criteria ?? '', this.filters)
|
|
1933
1886
|
.pipe(take(1));
|
|
1934
|
-
}))
|
|
1887
|
+
}))
|
|
1888
|
+
.subscribe({
|
|
1935
1889
|
next: (result) => {
|
|
1936
1890
|
this.isLoading = false;
|
|
1937
1891
|
this.displayedEntries = [];
|
|
@@ -1965,7 +1919,7 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1965
1919
|
this.showFailureMessage = true;
|
|
1966
1920
|
// Set a new subscription to allow retrying the search later.
|
|
1967
1921
|
this.initializeSearch();
|
|
1968
|
-
}
|
|
1922
|
+
},
|
|
1969
1923
|
});
|
|
1970
1924
|
if (!this.isSubscriptionInitialized) {
|
|
1971
1925
|
this.isSubscriptionInitialized = true;
|
|
@@ -1993,7 +1947,7 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
1993
1947
|
originY: 'top',
|
|
1994
1948
|
overlayX: 'start',
|
|
1995
1949
|
overlayY: 'bottom',
|
|
1996
|
-
}
|
|
1950
|
+
},
|
|
1997
1951
|
]);
|
|
1998
1952
|
this.overlayRef = this.overlay.create({
|
|
1999
1953
|
positionStrategy,
|
|
@@ -2006,9 +1960,10 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
2006
1960
|
const portal = new TemplatePortal(this.dropdownTemplate, this.viewContainerRef);
|
|
2007
1961
|
this.overlayRef.attach(portal);
|
|
2008
1962
|
this.isDropDownShown = true;
|
|
2009
|
-
this.focusedIndex =
|
|
2010
|
-
|
|
2011
|
-
|
|
1963
|
+
this.focusedIndex =
|
|
1964
|
+
this.selectedValue != null
|
|
1965
|
+
? this.displayedEntries.findIndex((entry) => entry.value === this.selectedValue)
|
|
1966
|
+
: -1;
|
|
2012
1967
|
this.updateInputAriaActiveDescendant();
|
|
2013
1968
|
// Re-evaluate minimum characters message visibility when opening the dropdown,
|
|
2014
1969
|
// in case it was incorrectly reset by a programmatic value change.
|
|
@@ -2073,9 +2028,9 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
2073
2028
|
}
|
|
2074
2029
|
}
|
|
2075
2030
|
tryFilterFromDataset(results) {
|
|
2076
|
-
if (this.dataGridDataset
|
|
2077
|
-
|
|
2078
|
-
|
|
2031
|
+
if (this.dataGridDataset &&
|
|
2032
|
+
this.controlName === this.dataGridDataset?.keyProperty &&
|
|
2033
|
+
this.dataGridDataset.hasLoadedRows) {
|
|
2079
2034
|
// If the control name is matching the ID property of the data grid dataset, filter out the loaded rows to remove duplicated IDs.
|
|
2080
2035
|
const loadedIDs = this.dataGridDataset.loadedKeys.map((key) => this.dataGridDataset.getRowID(key));
|
|
2081
2036
|
return results.filter((result) => loadedIDs.indexOf(result.value) < 0);
|
|
@@ -2094,9 +2049,7 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
2094
2049
|
}
|
|
2095
2050
|
updateMinimumCharactersMessageVisibility(criteria) {
|
|
2096
2051
|
this.showMinimumCharactersMessage =
|
|
2097
|
-
this.shouldUseCriteria
|
|
2098
|
-
&& this.minimumLengthSearch > 0
|
|
2099
|
-
&& (criteria?.length ?? 0) < this.minimumLengthSearch;
|
|
2052
|
+
this.shouldUseCriteria && this.minimumLengthSearch > 0 && (criteria?.length ?? 0) < this.minimumLengthSearch;
|
|
2100
2053
|
}
|
|
2101
2054
|
getNativeInput() {
|
|
2102
2055
|
return this.inputElement?.nativeElement?.querySelector('input') ?? null;
|
|
@@ -2136,18 +2089,12 @@ class CatalogSelectComponent extends BaseComponent {
|
|
|
2136
2089
|
input.removeAttribute('aria-activedescendant');
|
|
2137
2090
|
}
|
|
2138
2091
|
}
|
|
2139
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2140
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2092
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CatalogSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CatalogSelectComponent, isStandalone: true, selector: "lib-catalog-select", inputs: { autofocus: "autofocus", controlName: "controlName", displayControlName: "displayControlName", displayProperty: "displayProperty", entriesList: "entriesList", filters: "filters", label: "label", maxEntries: "maxEntries", minimumLengthSearch: "minimumLengthSearch", notes: "notes", readOnly: "readOnly", searchEndpoint: "searchEndpoint", validations: "validations", valueProperty: "valueProperty" }, host: { listeners: { "body:mousedown": "bodyMouseDown($event)", "body:mouseup": "bodyMouseUp($event)" } }, viewQueries: [{ propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, read: TemplateRef }, { propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<lib-form-input-group\n [controlName]=\"controlName\"\n [label]=\"label\"\n [notes]=\"notes\"\n [template]=\"template\"\n [validations]=\"validations\"\n>\n</lib-form-input-group>\n\n<ng-template #template>\n <div class=\"catalog-container\" [class.show]=\"isDropDownShown\">\n <lib-form-input\n #input\n [class.fixed-content]=\"readOnly && !shouldUseCriteria\"\n [autofocus]=\"autofocus\"\n [controlName]=\"displayControlName\"\n [invalid]=\"isInvalid && isTouched\"\n [readOnly]=\"readOnly\"\n (blurred)=\"onContainerBlur()\"\n (click)=\"onContainerClick()\"\n (focused)=\"onContainerFocus()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </lib-form-input>\n @if (showClearButton) {\n <button class=\"clear-button\" type=\"button\" tabindex=\"-1\" (click)=\"onClearClick($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <div class=\"dropdown-container\">\n <ul class=\"dropdown\" role=\"listbox\" [attr.id]=\"listboxId\">\n <!-- Status rows are not options: role=\"presentation\" keeps them out of the\n listbox's option set, and they carry no click handler. The dropdown already\n closes on Escape, on blur and on an outside click. -->\n @if (isLoading) {\n <li role=\"presentation\" aria-live=\"polite\">\n {{ 'CatalogSelect-Loading' | translate }}\n </li>\n }\n @if (shouldUseCriteria && showMinimumCharactersMessage) {\n <li\n role=\"presentation\"\n aria-live=\"polite\"\n title=\"{{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\"\n >\n {{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\n </li>\n }\n @if (showNoResultsMessage) {\n <li role=\"presentation\" aria-live=\"polite\" title=\"{{ 'CatalogSelect-NoResultsFound' | translate }}\">\n {{ 'CatalogSelect-NoResultsFound' | translate }}\n </li>\n }\n\n <!-- Retrying is a real action, so it is a real button and reachable by keyboard. -->\n @if (showFailureMessage) {\n <li class=\"error\" role=\"presentation\">\n <button\n class=\"retry\"\n type=\"button\"\n title=\"{{ 'CatalogSelect-FailureMessage' | translate }}\"\n (click)=\"onDropDownErrorClick()\"\n >\n {{ 'CatalogSelect-FailureMessage' | translate }}\n </button>\n </li>\n }\n\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus --\n Options in a combobox listbox are deliberately not focusable. Keyboard\n interaction lives on the input, which owns ArrowUp/ArrowDown/Enter/Escape and\n points at the active option through aria-activedescendant. Giving each option\n its own tabindex and key handlers would break that pattern. -->\n @for (entry of displayedEntries; track entry; let i = $index) {\n <li\n class=\"dropdown-item\"\n role=\"option\"\n [attr.id]=\"getOptionId(i)\"\n [attr.aria-selected]=\"selectedValue === entry.value\"\n [class.focused]=\"focusedIndex === i\"\n [class.selected]=\"selectedValue === entry.value\"\n (click)=\"onDropDownItemClick(entry)\"\n >\n {{ entry.display }}\n </li>\n }\n <!-- eslint-enable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n </ul>\n </div>\n</ng-template>\n", styles: [":host-context{grid-column:span 2 / span 2;display:grid;grid-template-columns:subgrid}.catalog-container{position:relative}.catalog-container .clear-button{position:absolute;right:1.75rem;top:50%;display:flex;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border-radius:9999px;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.catalog-container .clear-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.catalog-container .clear-button{z-index:10;cursor:pointer;border-style:none;background-color:transparent;padding:0;font-size:.875rem;line-height:1.25rem;line-height:1}.catalog-container:has(.clear-button) lib-form-input ::ng-deep input{padding-right:3.5rem}div lib-form-input ::ng-deep input{cursor:pointer;text-overflow:ellipsis;background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;padding-right:2.25rem;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%239ca3af' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3e%3c/svg%3e\")}.dropdown-container{width:100%;-webkit-user-select:none;user-select:none}.dropdown{overflow-y:auto;overscroll-behavior:none;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);max-height:13rem}.dropdown li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.25rem .5rem}.dropdown li:not(.dropdown-item){font-size:.875rem;line-height:1.25rem}.dropdown li .retry{width:100%;cursor:pointer;border-style:none;background-color:transparent;padding:0;text-align:left;text-decoration-line:underline;color:inherit;font:inherit}.dropdown li.dropdown-item{cursor:pointer}.dropdown li.dropdown-item:nth-child(2n){background-color:#f5f5f4b3}.dropdown li.dropdown-item.selected{background-color:#59a5db33;font-weight:700}.dropdown li.dropdown-item.focused{background-color:#59a5db4d;outline:2px solid transparent;outline-offset:2px}.dropdown li.dropdown-item:hover,.dropdown li.dropdown-item:nth-child(2n):hover,.dropdown li.dropdown-item.selected:hover,.dropdown li.dropdown-item.focused:hover{background-color:#59a5db80}lib-form-input-group{flex-basis:100%}\n"], dependencies: [{ kind: "component", type: FormInputComponent, selector: "lib-form-input", inputs: ["autofocus", "controlName", "disabledControlName", "displayReadOnlyAsDisabled", "fixedValue", "format", "invalid", "isDisabled", "isFullHeight", "maxLength", "min", "readOnly", "rows", "step", "type"], outputs: ["blurred", "changed", "fixedValueChanged", "focused", "inputChanged"] }, { kind: "component", type: FormInputGroupComponent, selector: "lib-form-input-group", inputs: ["autofocus", "alignContent", "controlName", "fixedValue", "format", "label", "isDisabled", "isFullHeight", "maxLength", "min", "notes", "readOnly", "rows", "showLabel", "step", "template", "type", "validations"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2141
2094
|
}
|
|
2142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CatalogSelectComponent, decorators: [{
|
|
2143
2096
|
type: Component,
|
|
2144
|
-
args: [{ selector: 'lib-catalog-select', imports: [
|
|
2145
|
-
FormInputComponent,
|
|
2146
|
-
FormInputGroupComponent,
|
|
2147
|
-
NgFor,
|
|
2148
|
-
NgIf,
|
|
2149
|
-
TranslatePipe,
|
|
2150
|
-
], template: "<lib-form-input-group\n[controlName]=\"controlName\"\n[label]=\"label\"\n[notes]=\"notes\"\n[template]=\"template\"\n[validations]=\"validations\">\n</lib-form-input-group>\n\n<ng-template #template>\n <div class=\"catalog-container\"\n [class.show]=\"isDropDownShown\">\n <lib-form-input #input\n [class.fixed-content]=\"readOnly && !shouldUseCriteria\"\n [autofocus]=\"autofocus\"\n [controlName]=\"displayControlName\"\n [invalid]=\"isInvalid && isTouched\"\n [readOnly]=\"readOnly\"\n (blurred)=\"onContainerBlur()\"\n (click)=\"onContainerClick()\"\n (focused)=\"onContainerFocus()\"\n (keydown)=\"onKeyDown($event)\">\n </lib-form-input>\n <button *ngIf=\"showClearButton\"\n class=\"clear-button\"\n type=\"button\"\n tabindex=\"-1\"\n (click)=\"onClearClick($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <div class=\"dropdown-container\">\n <ul class=\"dropdown\"\n role=\"listbox\"\n [attr.id]=\"listboxId\">\n <!-- Status rows are not options: role=\"presentation\" keeps them out of the\n listbox's option set, and they carry no click handler. The dropdown already\n closes on Escape, on blur and on an outside click. -->\n <li *ngIf=\"isLoading\"\n role=\"presentation\"\n aria-live=\"polite\">\n {{ 'CatalogSelect-Loading' | translate }}\n </li>\n\n <li *ngIf=\"shouldUseCriteria && showMinimumCharactersMessage\"\n role=\"presentation\"\n aria-live=\"polite\"\n title=\"{{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\">\n {{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\n </li>\n\n <li *ngIf=\"showNoResultsMessage\"\n role=\"presentation\"\n aria-live=\"polite\"\n title=\"{{ 'CatalogSelect-NoResultsFound' | translate }}\">\n {{ 'CatalogSelect-NoResultsFound' | translate }}\n </li>\n\n <!-- Retrying is a real action, so it is a real button and reachable by keyboard. -->\n <li *ngIf=\"showFailureMessage\"\n class=\"error\"\n role=\"presentation\">\n <button class=\"retry\"\n type=\"button\"\n title=\"{{ 'CatalogSelect-FailureMessage' | translate }}\"\n (click)=\"onDropDownErrorClick()\">\n {{ 'CatalogSelect-FailureMessage' | translate }}\n </button>\n </li>\n\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus --\n Options in a combobox listbox are deliberately not focusable. Keyboard\n interaction lives on the input, which owns ArrowUp/ArrowDown/Enter/Escape and\n points at the active option through aria-activedescendant. Giving each option\n its own tabindex and key handlers would break that pattern. -->\n <li class=\"dropdown-item\" *ngFor=\"let entry of displayedEntries; let i = index\"\n role=\"option\"\n [attr.id]=\"getOptionId(i)\"\n [attr.aria-selected]=\"selectedValue === entry.value\"\n [class.focused]=\"focusedIndex === i\"\n [class.selected]=\"selectedValue === entry.value\"\n (click)=\"onDropDownItemClick(entry)\">\n {{ entry.display }}\n </li>\n <!-- eslint-enable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n </ul>\n </div>\n</ng-template>", styles: [":host-context{grid-column:span 2 / span 2;display:grid;grid-template-columns:subgrid}.catalog-container{position:relative}.catalog-container .clear-button{position:absolute;right:1.75rem;top:50%;display:flex;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border-radius:9999px;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.catalog-container .clear-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.catalog-container .clear-button{z-index:10;cursor:pointer;border-style:none;background-color:transparent;padding:0;font-size:.875rem;line-height:1.25rem;line-height:1}.catalog-container:has(.clear-button) lib-form-input ::ng-deep input{padding-right:3.5rem}div lib-form-input ::ng-deep input{cursor:pointer;text-overflow:ellipsis;background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;padding-right:2.25rem;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%239ca3af' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3e%3c/svg%3e\")}.dropdown-container{width:100%;-webkit-user-select:none;user-select:none}.dropdown{overflow-y:auto;overscroll-behavior:none;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);max-height:13rem}.dropdown li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.25rem .5rem}.dropdown li:not(.dropdown-item){font-size:.875rem;line-height:1.25rem}.dropdown li .retry{width:100%;cursor:pointer;border-style:none;background-color:transparent;padding:0;text-align:left;text-decoration-line:underline;color:inherit;font:inherit}.dropdown li.dropdown-item{cursor:pointer}.dropdown li.dropdown-item:nth-child(2n){background-color:#f5f5f4b3}.dropdown li.dropdown-item.selected{background-color:#59a5db33;font-weight:700}.dropdown li.dropdown-item.focused{background-color:#59a5db4d;outline:2px solid transparent;outline-offset:2px}.dropdown li.dropdown-item:hover,.dropdown li.dropdown-item:nth-child(2n):hover,.dropdown li.dropdown-item.selected:hover,.dropdown li.dropdown-item.focused:hover{background-color:#59a5db80}lib-form-input-group{flex-basis:100%}\n"] }]
|
|
2097
|
+
args: [{ selector: 'lib-catalog-select', changeDetection: ChangeDetectionStrategy.Eager, imports: [FormInputComponent, FormInputGroupComponent, TranslatePipe], template: "<lib-form-input-group\n [controlName]=\"controlName\"\n [label]=\"label\"\n [notes]=\"notes\"\n [template]=\"template\"\n [validations]=\"validations\"\n>\n</lib-form-input-group>\n\n<ng-template #template>\n <div class=\"catalog-container\" [class.show]=\"isDropDownShown\">\n <lib-form-input\n #input\n [class.fixed-content]=\"readOnly && !shouldUseCriteria\"\n [autofocus]=\"autofocus\"\n [controlName]=\"displayControlName\"\n [invalid]=\"isInvalid && isTouched\"\n [readOnly]=\"readOnly\"\n (blurred)=\"onContainerBlur()\"\n (click)=\"onContainerClick()\"\n (focused)=\"onContainerFocus()\"\n (keydown)=\"onKeyDown($event)\"\n >\n </lib-form-input>\n @if (showClearButton) {\n <button class=\"clear-button\" type=\"button\" tabindex=\"-1\" (click)=\"onClearClick($event)\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n }\n </div>\n</ng-template>\n\n<ng-template #dropdownTemplate>\n <div class=\"dropdown-container\">\n <ul class=\"dropdown\" role=\"listbox\" [attr.id]=\"listboxId\">\n <!-- Status rows are not options: role=\"presentation\" keeps them out of the\n listbox's option set, and they carry no click handler. The dropdown already\n closes on Escape, on blur and on an outside click. -->\n @if (isLoading) {\n <li role=\"presentation\" aria-live=\"polite\">\n {{ 'CatalogSelect-Loading' | translate }}\n </li>\n }\n @if (shouldUseCriteria && showMinimumCharactersMessage) {\n <li\n role=\"presentation\"\n aria-live=\"polite\"\n title=\"{{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\"\n >\n {{ 'CatalogSelect-MinimumLengthSearch' | translate: { minimumLengthSearch: minimumLengthSearch } }}\n </li>\n }\n @if (showNoResultsMessage) {\n <li role=\"presentation\" aria-live=\"polite\" title=\"{{ 'CatalogSelect-NoResultsFound' | translate }}\">\n {{ 'CatalogSelect-NoResultsFound' | translate }}\n </li>\n }\n\n <!-- Retrying is a real action, so it is a real button and reachable by keyboard. -->\n @if (showFailureMessage) {\n <li class=\"error\" role=\"presentation\">\n <button\n class=\"retry\"\n type=\"button\"\n title=\"{{ 'CatalogSelect-FailureMessage' | translate }}\"\n (click)=\"onDropDownErrorClick()\"\n >\n {{ 'CatalogSelect-FailureMessage' | translate }}\n </button>\n </li>\n }\n\n <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus --\n Options in a combobox listbox are deliberately not focusable. Keyboard\n interaction lives on the input, which owns ArrowUp/ArrowDown/Enter/Escape and\n points at the active option through aria-activedescendant. Giving each option\n its own tabindex and key handlers would break that pattern. -->\n @for (entry of displayedEntries; track entry; let i = $index) {\n <li\n class=\"dropdown-item\"\n role=\"option\"\n [attr.id]=\"getOptionId(i)\"\n [attr.aria-selected]=\"selectedValue === entry.value\"\n [class.focused]=\"focusedIndex === i\"\n [class.selected]=\"selectedValue === entry.value\"\n (click)=\"onDropDownItemClick(entry)\"\n >\n {{ entry.display }}\n </li>\n }\n <!-- eslint-enable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n </ul>\n </div>\n</ng-template>\n", styles: [":host-context{grid-column:span 2 / span 2;display:grid;grid-template-columns:subgrid}.catalog-container{position:relative}.catalog-container .clear-button{position:absolute;right:1.75rem;top:50%;display:flex;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border-radius:9999px;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.catalog-container .clear-button:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.catalog-container .clear-button{z-index:10;cursor:pointer;border-style:none;background-color:transparent;padding:0;font-size:.875rem;line-height:1.25rem;line-height:1}.catalog-container:has(.clear-button) lib-form-input ::ng-deep input{padding-right:3.5rem}div lib-form-input ::ng-deep input{cursor:pointer;text-overflow:ellipsis;background-size:1.125rem 1.125rem;background-position:right .5625rem center;background-repeat:no-repeat;padding-right:2.25rem;background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%239ca3af' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/%3e%3c/svg%3e\")}.dropdown-container{width:100%;-webkit-user-select:none;user-select:none}.dropdown{overflow-y:auto;overscroll-behavior:none;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);max-height:13rem}.dropdown li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.25rem .5rem}.dropdown li:not(.dropdown-item){font-size:.875rem;line-height:1.25rem}.dropdown li .retry{width:100%;cursor:pointer;border-style:none;background-color:transparent;padding:0;text-align:left;text-decoration-line:underline;color:inherit;font:inherit}.dropdown li.dropdown-item{cursor:pointer}.dropdown li.dropdown-item:nth-child(2n){background-color:#f5f5f4b3}.dropdown li.dropdown-item.selected{background-color:#59a5db33;font-weight:700}.dropdown li.dropdown-item.focused{background-color:#59a5db4d;outline:2px solid transparent;outline-offset:2px}.dropdown li.dropdown-item:hover,.dropdown li.dropdown-item:nth-child(2n):hover,.dropdown li.dropdown-item.selected:hover,.dropdown li.dropdown-item.focused:hover{background-color:#59a5db80}lib-form-input-group{flex-basis:100%}\n"] }]
|
|
2151
2098
|
}], ctorParameters: () => [], propDecorators: { bodyMouseDown: [{
|
|
2152
2099
|
type: HostListener,
|
|
2153
2100
|
args: ['body:mousedown', ['$event']]
|
|
@@ -2277,7 +2224,8 @@ class DataGridRowComponent extends BaseComponent {
|
|
|
2277
2224
|
this.selectionResized.emit(width);
|
|
2278
2225
|
}
|
|
2279
2226
|
onToggleSelection() {
|
|
2280
|
-
if (this.disabled ||
|
|
2227
|
+
if (this.disabled ||
|
|
2228
|
+
(this.dataGridDataset.configs.multiSelect && (this.dataGridDataset.configs.selectOnClick ?? true))) {
|
|
2281
2229
|
return;
|
|
2282
2230
|
}
|
|
2283
2231
|
this.selected = !this.selected;
|
|
@@ -2298,22 +2246,15 @@ class DataGridRowComponent extends BaseComponent {
|
|
|
2298
2246
|
refreshSelection() {
|
|
2299
2247
|
this.selected = this.isRowDataSelected;
|
|
2300
2248
|
}
|
|
2301
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2302
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2250
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DataGridRowComponent, isStandalone: true, selector: "lib-data-grid-row", inputs: { disabled: "disabled", isFirstRow: "isFirstRow", rowData: "rowData" }, outputs: { selectionResized: "selectionResized" }, host: { listeners: { "click": "setFocus()" }, properties: { "class.focused": "dataGridDataset.focusedRowKey === rowData", "class.selected": "dataGridDataset.isKeySelected(rowKey)" } }, usesInheritance: true, ngImport: i0, template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div #cell class=\"cell\" [class.disabled]=\"disabled\" [ngClass]=\"column.customClass\">\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(i, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<ng-template #simpleTemplate let-rowData=\"rowData\" let-column=\"column\">\n <span>{{ getValue(column.field) }}</span>\n</ng-template>\n", styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.CheckboxControlValueAccessor, selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NgxResizeObserverModule }, { kind: "directive", type: i2.NgxResizeObserverDirective, selector: "[onResize]", inputs: ["resizeBoxModel"], outputs: ["onResize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2303
2251
|
}
|
|
2304
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridRowComponent, decorators: [{
|
|
2305
2253
|
type: Component,
|
|
2306
2254
|
args: [{ selector: 'lib-data-grid-row', host: {
|
|
2307
|
-
'[class.focused]': 'dataGridDataset.
|
|
2255
|
+
'[class.focused]': 'dataGridDataset.focusedRowKey === rowData',
|
|
2308
2256
|
'[class.selected]': 'dataGridDataset.isKeySelected(rowKey)',
|
|
2309
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2310
|
-
FormsModule,
|
|
2311
|
-
NgClass,
|
|
2312
|
-
NgIf,
|
|
2313
|
-
NgFor,
|
|
2314
|
-
NgTemplateOutlet,
|
|
2315
|
-
NgxResizeObserverModule,
|
|
2316
|
-
], template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\n reaches the checkbox, natively. The click handler is a mouse-only convenience;\n the keyboard path is the nested checkbox, which is focusable and toggles with\n Space on its own. -->\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n<label *ngIf=\"dataGridDataset.configs.multiSelect\"\nclass=\"cell selection\"\n(click)=\"onToggleSelection()\"\n(onResize)=\"onResizeSelection($event)\">\n <input class=\"form-input\"\n type=\"checkbox\"\n [attr.disabled]=\"disabled\"\n [(ngModel)]=\"selected\" />\n</label>\n\n<div #cell\n*ngFor=\"let column of columns; index as i\"\nclass=\"cell\"\n[class.disabled]=\"disabled\"\n[ngClass]=\"column.customClass\">\n <div *ngIf=\"isFirstRow\"\n class=\"spacer\"\n (onResize)=\"onResize(i, $event)\"></div>\n\n <ng-container *ngTemplateOutlet=\"column.template ? column.template : simpleTemplate; context: { rowData: rowData, column: column }\">\n </ng-container>\n</div>\n\n<ng-template #simpleTemplate let-rowData=\"rowData\" let-column=\"column\">\n <span>{{ getValue(column.field) }}</span>\n</ng-template>", styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n"] }]
|
|
2257
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FormsModule, NgClass, NgTemplateOutlet, NgxResizeObserverModule], template: "<!-- A <label> rather than a clickable <div>: clicking anywhere in the cell still\nreaches the checkbox, natively. The click handler is a mouse-only convenience;\nthe keyboard path is the nested checkbox, which is focusable and toggles with\nSpace on its own. -->\n@if (dataGridDataset.configs.multiSelect) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -->\n <label class=\"cell selection\" (click)=\"onToggleSelection()\" (onResize)=\"onResizeSelection($event)\">\n <input class=\"form-input\" type=\"checkbox\" [attr.disabled]=\"disabled\" [(ngModel)]=\"selected\" />\n </label>\n}\n@for (column of columns; track column; let i = $index) {\n <div #cell class=\"cell\" [class.disabled]=\"disabled\" [ngClass]=\"column.customClass\">\n @if (isFirstRow) {\n <div class=\"spacer\" (onResize)=\"onResize(i, $event)\"></div>\n }\n <ng-container\n *ngTemplateOutlet=\"\n column.template ? column.template : simpleTemplate;\n context: { rowData: rowData, column: column }\n \"\n >\n </ng-container>\n </div>\n}\n\n<ng-template #simpleTemplate let-rowData=\"rowData\" let-column=\"column\">\n <span>{{ getValue(column.field) }}</span>\n</ng-template>\n", styles: [":host{grid-column:1 / -1;display:grid;grid-template-columns:subgrid}.cell{position:relative;align-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell.disabled{pointer-events:none;cursor:default;overflow:hidden;text-overflow:ellipsis;opacity:.6}.cell input{vertical-align:super}.cell.selection{display:flex;align-items:center}.spacer{position:absolute;inset:0;z-index:-1;height:0px}\n"] }]
|
|
2317
2258
|
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
|
2318
2259
|
type: Input
|
|
2319
2260
|
}], isFirstRow: [{
|
|
@@ -2399,7 +2340,7 @@ class DataGridComponent extends BaseComponent {
|
|
|
2399
2340
|
get selectionColWidth() {
|
|
2400
2341
|
return this.selectionColRealSize
|
|
2401
2342
|
? `${this.selectionColRealSize}px`
|
|
2402
|
-
: this.configs.multiSelectSize ?? 'minmax(1.5rem,min-content)';
|
|
2343
|
+
: (this.configs.multiSelectSize ?? 'minmax(1.5rem,min-content)');
|
|
2403
2344
|
}
|
|
2404
2345
|
get shouldDisplayMessageWhenEmpty() {
|
|
2405
2346
|
return this.dataGridDataset?.configs?.showMessageOnEmpty ?? true;
|
|
@@ -2425,14 +2366,10 @@ class DataGridComponent extends BaseComponent {
|
|
|
2425
2366
|
this.isGridCurrentUrl = true;
|
|
2426
2367
|
}
|
|
2427
2368
|
});
|
|
2428
|
-
this.dataGridDataset.loadStarted
|
|
2429
|
-
.pipe(takeUntil(this.destroy$))
|
|
2430
|
-
.subscribe(() => {
|
|
2369
|
+
this.dataGridDataset.loadStarted.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
2431
2370
|
this.loading = true;
|
|
2432
2371
|
});
|
|
2433
|
-
this.dataGridDataset.loadFinished
|
|
2434
|
-
.pipe(takeUntil(this.destroy$))
|
|
2435
|
-
.subscribe((isSuccess) => {
|
|
2372
|
+
this.dataGridDataset.loadFinished.pipe(takeUntil(this.destroy$)).subscribe((isSuccess) => {
|
|
2436
2373
|
this.loading = false;
|
|
2437
2374
|
this.hasFailed = !isSuccess;
|
|
2438
2375
|
setTimeout(() => {
|
|
@@ -2477,18 +2414,14 @@ class DataGridComponent extends BaseComponent {
|
|
|
2477
2414
|
});
|
|
2478
2415
|
});
|
|
2479
2416
|
}
|
|
2480
|
-
this.viewport?.renderedRangeStream
|
|
2481
|
-
.pipe(takeUntil(this.destroy$))
|
|
2482
|
-
.subscribe((listRange) => {
|
|
2417
|
+
this.viewport?.renderedRangeStream.pipe(takeUntil(this.destroy$)).subscribe((listRange) => {
|
|
2483
2418
|
const loadedRows = this.dataGridDataset.loadedRows?.length ?? 0;
|
|
2484
2419
|
if (this.hasLoadedRows && !this.loading && listRange.end >= loadedRows && !this.dataGridDataset.loadedLastRow) {
|
|
2485
2420
|
this.loading = true;
|
|
2486
2421
|
this.dataGridDataset.loadRows();
|
|
2487
2422
|
}
|
|
2488
2423
|
});
|
|
2489
|
-
this.bodyResized$
|
|
2490
|
-
.pipe(debounceTime(150), takeUntil(this.destroy$))
|
|
2491
|
-
.subscribe(() => {
|
|
2424
|
+
this.bodyResized$.pipe(debounceTime(150), takeUntil(this.destroy$)).subscribe(() => {
|
|
2492
2425
|
const viewportWidth = this.viewport?.measureViewportSize('horizontal') ?? 0;
|
|
2493
2426
|
if (viewportWidth > 0) {
|
|
2494
2427
|
this.headerRightMargin = this.bodyElement.nativeElement.clientWidth - viewportWidth;
|
|
@@ -2538,21 +2471,14 @@ class DataGridComponent extends BaseComponent {
|
|
|
2538
2471
|
trackByFn(index, item) {
|
|
2539
2472
|
return item.key;
|
|
2540
2473
|
}
|
|
2541
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2542
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2474
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2475
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DataGridComponent, isStandalone: true, selector: "lib-data-grid", inputs: { disabled: "disabled", lazyLoadRows: "lazyLoadRows", showButtons: "showButtons" }, host: { properties: { "class.no-borders": "showButtons" } }, viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["body"], descendants: true }, { propertyName: "viewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showButtons) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft ? 'translateX(-' + headerScrollLeft + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading && !hasBeenLoaded && lazyLoadRows) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n @if (!loading && hasBeenLoaded && (!hasLoadedRows || hasFailed)) {\n @if (!hasFailed && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i>{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n</div>\n", styles: [":host-context{display:flex;-webkit-user-select:none;user-select:none;flex-direction:column;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}:host-context.no-borders .header .header-row{padding-top:.375rem;padding-bottom:.375rem}:host-context.no-borders .body lib-data-grid-row{padding-top:.25rem;padding-bottom:.25rem}.header-row,lib-data-grid-row,.loading,.message{gap:1rem;padding-left:1rem;padding-right:1rem}.header{overflow:hidden;border-bottom-width:1px;border-color:#d1d5dbe6;background-color:#e5e7eb66;font-weight:700}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-top:.75rem;padding-bottom:.75rem}.header .header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header .header-cell:not(.selection){flex:none}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-top-width:1px;border-bottom-width:1px;border-color:#cbd5e180;padding-top:.5rem;padding-bottom:.5rem}.body lib-data-grid-row:nth-child(2n){background-color:#f8fafcb3}.body lib-data-grid-row:hover{background-color:#bfdbfe33}.body lib-data-grid-row.focused{z-index:1;border-color:#94a3b899}.body lib-data-grid-row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body lib-data-grid-row.selected:hover{background-color:#bfdbfe66}.body .loading,.body .message{display:flex;align-items:center;gap:.5rem;white-space:nowrap;height:2.5rem;border-bottom-width:1px;border-color:#cbd5e180;grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:1.5rem;min-height:1.5rem;width:1.5rem;min-width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.buttons{display:flex;border-top-width:1px;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem}\n"], dependencies: [{ kind: "component", type: DataGridRowComponent, selector: "lib-data-grid-row", inputs: ["disabled", "isFirstRow", "rowData"], outputs: ["selectionResized"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i1$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i1$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i1$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2543
2476
|
}
|
|
2544
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2477
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridComponent, decorators: [{
|
|
2545
2478
|
type: Component,
|
|
2546
2479
|
args: [{ selector: 'lib-data-grid', host: {
|
|
2547
2480
|
'[class.no-borders]': 'showButtons',
|
|
2548
|
-
}, imports: [
|
|
2549
|
-
DataGridRowComponent,
|
|
2550
|
-
NgFor,
|
|
2551
|
-
NgIf,
|
|
2552
|
-
NgStyle,
|
|
2553
|
-
ScrollingModule,
|
|
2554
|
-
TranslatePipe,
|
|
2555
|
-
], template: "<div class=\"buttons\"\n*ngIf=\"showButtons\">\n <ng-content select=\"[buttons]\"></ng-content>\n</div>\n\n<div class=\"header\"\n[class.hide]=\"isHideColumns\"\n[style.padding-right.px]=\"headerRightMargin\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\"\n [style.transform]=\"headerScrollLeft ? 'translateX(-' + headerScrollLeft + 'px)' : null\">\n <div *ngIf=\"isShowMultiSelect\"\n class=\"header-cell selection\"\n [ngStyle]=\"{\n 'width': selectionColWidth ? selectionColWidth : null\n }\">\n \n </div>\n \n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too. The old test read `realSize ?? 0 > 0`, which binds\n as `realSize ?? (0 > 0)` and so turned zero into no width at all.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n <div *ngFor=\"let column of columns\"\n class=\"header-cell\"\n [ngStyle]=\"{\n 'display': column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null\n }\">\n <span>{{ column.headerName | translate }}</span>\n </div>\n </div>\n</div>\n\n<div #body\nclass=\"body\"\n[style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport\n [itemSize]=\"configs.rowHeight\"\n [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\">\n </lib-data-grid-row>\n\n <div *ngIf=\"loading\"\n class=\"loading\"\n [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n \n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }} \n </span>\n </div>\n \n <div *ngIf=\"!loading && !hasBeenLoaded && lazyLoadRows\"\n class=\"message\"\n [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n\n <ng-container *ngIf=\"!loading && hasBeenLoaded && (!hasLoadedRows || hasFailed)\">\n <div *ngIf=\"!hasFailed && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty\"\n class=\"message\"\n [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n\n <div *ngIf=\"hasFailed\"\n class=\"message\"\n [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i>{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n</div>", styles: [":host-context{display:flex;-webkit-user-select:none;user-select:none;flex-direction:column;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}:host-context.no-borders .header .header-row{padding-top:.375rem;padding-bottom:.375rem}:host-context.no-borders .body lib-data-grid-row{padding-top:.25rem;padding-bottom:.25rem}.header-row,lib-data-grid-row,.loading,.message{gap:1rem;padding-left:1rem;padding-right:1rem}.header{overflow:hidden;border-bottom-width:1px;border-color:#d1d5dbe6;background-color:#e5e7eb66;font-weight:700}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-top:.75rem;padding-bottom:.75rem}.header .header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header .header-cell:not(.selection){flex:none}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-top-width:1px;border-bottom-width:1px;border-color:#cbd5e180;padding-top:.5rem;padding-bottom:.5rem}.body lib-data-grid-row:nth-child(2n){background-color:#f8fafcb3}.body lib-data-grid-row:hover{background-color:#bfdbfe33}.body lib-data-grid-row.focused{z-index:1;border-color:#94a3b899}.body lib-data-grid-row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body lib-data-grid-row.selected:hover{background-color:#bfdbfe66}.body .loading,.body .message{display:flex;align-items:center;gap:.5rem;white-space:nowrap;height:2.5rem;border-bottom-width:1px;border-color:#cbd5e180;grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:1.5rem;min-height:1.5rem;width:1.5rem;min-width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.buttons{display:flex;border-top-width:1px;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem}\n"] }]
|
|
2481
|
+
}, changeDetection: ChangeDetectionStrategy.Eager, imports: [DataGridRowComponent, NgStyle, ScrollingModule, TranslatePipe], template: "@if (showButtons) {\n <div class=\"buttons\">\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n}\n\n<div class=\"header\" [class.hide]=\"isHideColumns\" [style.padding-right.px]=\"headerRightMargin\">\n <!-- Translated by however far the body is scrolled sideways. The rows scroll inside the CDK\n viewport and the header sits outside it, so without this the headings simply stay put\n while the cells move away from them. -->\n <div class=\"header-row\" [style.transform]=\"headerScrollLeft ? 'translateX(-' + headerScrollLeft + 'px)' : null\">\n @if (isShowMultiSelect) {\n <div\n class=\"header-cell selection\"\n [ngStyle]=\"{\n width: selectionColWidth ? selectionColWidth : null,\n }\"\n >\n \n </div>\n }\n\n <!-- A measured zero is a width, not the absence of one: it is a 1fr column that collapsed,\n and its heading has to collapse too.\n\n Such a heading is removed rather than merely made zero wide, because a flex item still\n takes a gap on each side while the body grid allows the collapsed track only one, and\n that spare gap pushed every heading to its right out by 16px. -->\n @for (column of columns; track column) {\n <div\n class=\"header-cell\"\n [ngStyle]=\"{\n display: column.realSize === 0 ? 'none' : null,\n 'width.px': column.realSize ?? null,\n }\"\n >\n <span>{{ column.headerName | translate }}</span>\n </div>\n }\n </div>\n</div>\n\n<div #body class=\"body\" [style.min-height.px]=\"bodyMinHeight\">\n <cdk-virtual-scroll-viewport [itemSize]=\"configs.rowHeight\" [style.grid-template-columns]=\"gridColumns\">\n <lib-data-grid-row\n #row\n *cdkVirtualFor=\"let row of dataGridDataset.loadedRows; index as i; trackBy: trackByFn\"\n [disabled]=\"disabled\"\n [isFirstRow]=\"isFirstVisibleRow(i)\"\n [rowData]=\"row\"\n [style.height.px]=\"configs.rowHeight\"\n (selectionResized)=\"onSelectionResized($event)\"\n >\n </lib-data-grid-row>\n\n @if (loading) {\n <div class=\"loading\" [style.height.px]=\"configs.rowHeight\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ dataGridDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n @if (!loading && !hasBeenLoaded && lazyLoadRows) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenLazyLoad | translate }}\n </span>\n </div>\n }\n @if (!loading && hasBeenLoaded && (!hasLoadedRows || hasFailed)) {\n @if (!hasFailed && !hasLoadedRows && hasMessageToDisplayWhenEmpty && shouldDisplayMessageWhenEmpty) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n {{ messageToDisplayWhenEmpty | translate }}\n </span>\n </div>\n }\n @if (hasFailed) {\n <div class=\"message\" [style.height.px]=\"configs.rowHeight\">\n <span>\n <i class=\"fas fa-exclamation-triangle mr-2 text-yellow-600\"></i>{{ messageToDisplayWhenFailed | translate }}\n </span>\n </div>\n }\n }\n </cdk-virtual-scroll-viewport>\n</div>\n", styles: [":host-context{display:flex;-webkit-user-select:none;user-select:none;flex-direction:column;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}:host-context.no-borders .header .header-row{padding-top:.375rem;padding-bottom:.375rem}:host-context.no-borders .body lib-data-grid-row{padding-top:.25rem;padding-bottom:.25rem}.header-row,lib-data-grid-row,.loading,.message{gap:1rem;padding-left:1rem;padding-right:1rem}.header{overflow:hidden;border-bottom-width:1px;border-color:#d1d5dbe6;background-color:#e5e7eb66;font-weight:700}.header.hide{display:none}.header .header-row{display:flex;flex-direction:row;padding-top:.75rem;padding-bottom:.75rem}.header .header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header .header-cell:not(.selection){flex:none}.body{position:relative;flex-grow:1}.body cdk-virtual-scroll-viewport{position:absolute;inset:0}.body cdk-virtual-scroll-viewport ::ng-deep .cdk-virtual-scroll-content-wrapper{display:grid;grid-template-columns:inherit}.body lib-data-grid-row{margin-top:-1px;cursor:pointer;border-top-width:1px;border-bottom-width:1px;border-color:#cbd5e180;padding-top:.5rem;padding-bottom:.5rem}.body lib-data-grid-row:nth-child(2n){background-color:#f8fafcb3}.body lib-data-grid-row:hover{background-color:#bfdbfe33}.body lib-data-grid-row.focused{z-index:1;border-color:#94a3b899}.body lib-data-grid-row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body lib-data-grid-row.selected:hover{background-color:#bfdbfe66}.body .loading,.body .message{display:flex;align-items:center;gap:.5rem;white-space:nowrap;height:2.5rem;border-bottom-width:1px;border-color:#cbd5e180;grid-column:1 / -1}.body .loading span,.body .message span{overflow:hidden;text-overflow:ellipsis}.body .loading svg{height:1.5rem;min-height:1.5rem;width:1.5rem;min-width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.buttons{display:flex;border-top-width:1px;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem}\n"] }]
|
|
2556
2482
|
}], ctorParameters: () => [], propDecorators: { bodyElement: [{
|
|
2557
2483
|
type: ViewChild,
|
|
2558
2484
|
args: ['body']
|
|
@@ -2578,17 +2504,14 @@ class FormGroupComponent {
|
|
|
2578
2504
|
get hasTitle() {
|
|
2579
2505
|
return !!this.label;
|
|
2580
2506
|
}
|
|
2581
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2582
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2507
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2508
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: FormGroupComponent, isStandalone: true, selector: "lib-form-group", inputs: { shouldExpand: "shouldExpand", label: "label" }, host: { properties: { "class.expand": "shouldExpand" } }, ngImport: i0, template: "@if (hasTitle) {\n <h3 class=\"title\">\n {{ label | translate }}\n </h3>\n}\n\n<div class=\"content\" [class.has-title]=\"hasTitle\">\n <ng-content></ng-content>\n</div>\n", styles: [":host-context.expand{display:flex;max-height:100%;flex-direction:column;overflow-y:hidden}:host-context.expand .content{max-height:100%;flex-grow:1;overflow-y:hidden}.title{font-size:1.125rem;line-height:1.75rem;font-weight:600}.content{display:grid;grid-auto-rows:auto;grid-template-columns:min-content minmax(0,1fr);gap:.25rem}.content.has-title{border-top-width:1px;border-color:#d1d5dbe6;padding:.75rem .5rem .5rem}\n"], dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2583
2509
|
}
|
|
2584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: FormGroupComponent, decorators: [{
|
|
2585
2511
|
type: Component,
|
|
2586
|
-
args: [{ selector: 'lib-form-group', imports: [
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
], host: {
|
|
2590
|
-
'[class.expand]': 'shouldExpand'
|
|
2591
|
-
}, template: "<h3 *ngIf=\"hasTitle\"\nclass=\"title\" >\n {{ label | translate }}\n</h3>\n\n<div class=\"content\"\n[class.has-title]=\"hasTitle\">\n <ng-content></ng-content>\n</div>", styles: [":host-context.expand{display:flex;max-height:100%;flex-direction:column;overflow-y:hidden}:host-context.expand .content{max-height:100%;flex-grow:1;overflow-y:hidden}.title{font-size:1.125rem;line-height:1.75rem;font-weight:600}.content{display:grid;grid-auto-rows:auto;grid-template-columns:min-content minmax(0,1fr);gap:.25rem}.content.has-title{border-top-width:1px;border-color:#d1d5dbe6;padding:.75rem .5rem .5rem}\n"] }]
|
|
2512
|
+
args: [{ selector: 'lib-form-group', imports: [TranslatePipe], host: {
|
|
2513
|
+
'[class.expand]': 'shouldExpand',
|
|
2514
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasTitle) {\n <h3 class=\"title\">\n {{ label | translate }}\n </h3>\n}\n\n<div class=\"content\" [class.has-title]=\"hasTitle\">\n <ng-content></ng-content>\n</div>\n", styles: [":host-context.expand{display:flex;max-height:100%;flex-direction:column;overflow-y:hidden}:host-context.expand .content{max-height:100%;flex-grow:1;overflow-y:hidden}.title{font-size:1.125rem;line-height:1.75rem;font-weight:600}.content{display:grid;grid-auto-rows:auto;grid-template-columns:min-content minmax(0,1fr);gap:.25rem}.content.has-title{border-top-width:1px;border-color:#d1d5dbe6;padding:.75rem .5rem .5rem}\n"] }]
|
|
2592
2515
|
}], propDecorators: { shouldExpand: [{
|
|
2593
2516
|
type: Input
|
|
2594
2517
|
}], label: [{
|
|
@@ -2637,14 +2560,12 @@ class GroupAccordionComponent {
|
|
|
2637
2560
|
setMaxHeight() {
|
|
2638
2561
|
this._maxHeight = this.containerElementRef?.nativeElement?.offsetHeight ?? 0;
|
|
2639
2562
|
}
|
|
2640
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2641
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2563
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2564
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: GroupAccordionComponent, isStandalone: true, selector: "lib-group-accordion", inputs: { label: "label" }, host: { properties: { "class.collapsed": "collapsed" } }, viewQueries: [{ propertyName: "containerElementRef", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div class=\"title\">\n <h6\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"onToggle()\"\n (keydown.enter)=\"onToggle()\"\n (keydown.space)=\"onToggle(); $event.preventDefault()\"\n >\n <i class=\"fas fa-chevron-down fa-sm\"></i>{{ this.label }}\n </h6>\n</div>\n\n<div\n #container\n class=\"content animate\"\n [ngStyle]=\"\n (maxHeight >= 0 && {\n 'height.px': maxHeight,\n 'max-height.px': maxHeight,\n }) ||\n null\n \"\n>\n <div #maxHeighContainer>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host-context{margin-bottom:1rem;display:flex;flex-direction:column}:host-context.collapsed i{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host-context.collapsed .content{max-height:0px!important;overflow:hidden!important}:host-context:not(.collapsed) .content{animation:show .15s}.title{-webkit-user-select:none;user-select:none}.title i{margin-right:.5rem;padding-top:.25rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1));transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.title h6{margin-bottom:0;display:inline;height:3rem;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;padding-left:.25rem;padding-right:.5rem;font-size:1.125rem;text-transform:uppercase;line-height:3rem}.content{box-sizing:content-box;flex-grow:1;overflow-y:hidden;padding-left:.25rem;padding-right:.25rem}.content.animate{transition-property:max-height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.content div{padding-bottom:.25rem}@media(min-width:1024px){.content div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}}@media(min-width:1280px){.content div{grid-template-columns:repeat(3,minmax(0,1fr))}}.content div{height:100%}@keyframes show{0%{overflow:hidden}99%{overflow:hidden}to{overflow:auto}}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2642
2565
|
}
|
|
2643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupAccordionComponent, decorators: [{
|
|
2644
2567
|
type: Component,
|
|
2645
|
-
args: [{ selector: 'lib-group-accordion', host: { '[class.collapsed]': 'collapsed' }, imports: [
|
|
2646
|
-
NgStyle,
|
|
2647
|
-
], template: "<div class=\"title\">\n <h6 role=\"button\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"onToggle()\"\n (keydown.enter)=\"onToggle()\"\n (keydown.space)=\"onToggle(); $event.preventDefault()\"><i class=\"fas fa-chevron-down fa-sm\"></i>{{ this.label }}</h6>\n</div>\n\n<div #container class=\"content animate\"\n[ngStyle]=\"maxHeight >= 0 && {\n 'height.px': maxHeight,\n 'max-height.px': maxHeight\n} || null\">\n <div #maxHeighContainer>\n <ng-content></ng-content>\n </div>\n</div>", styles: [":host-context{margin-bottom:1rem;display:flex;flex-direction:column}:host-context.collapsed i{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host-context.collapsed .content{max-height:0px!important;overflow:hidden!important}:host-context:not(.collapsed) .content{animation:show .15s}.title{-webkit-user-select:none;user-select:none}.title i{margin-right:.5rem;padding-top:.25rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1));transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.title h6{margin-bottom:0;display:inline;height:3rem;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;padding-left:.25rem;padding-right:.5rem;font-size:1.125rem;text-transform:uppercase;line-height:3rem}.content{box-sizing:content-box;flex-grow:1;overflow-y:hidden;padding-left:.25rem;padding-right:.25rem}.content.animate{transition-property:max-height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.content div{padding-bottom:.25rem}@media (min-width: 1024px){.content div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}}@media (min-width: 1280px){.content div{grid-template-columns:repeat(3,minmax(0,1fr))}}.content div{height:100%}@keyframes show{0%{overflow:hidden}99%{overflow:hidden}to{overflow:auto}}\n"] }]
|
|
2568
|
+
args: [{ selector: 'lib-group-accordion', host: { '[class.collapsed]': 'collapsed' }, changeDetection: ChangeDetectionStrategy.Eager, imports: [NgStyle], template: "<div class=\"title\">\n <h6\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"onToggle()\"\n (keydown.enter)=\"onToggle()\"\n (keydown.space)=\"onToggle(); $event.preventDefault()\"\n >\n <i class=\"fas fa-chevron-down fa-sm\"></i>{{ this.label }}\n </h6>\n</div>\n\n<div\n #container\n class=\"content animate\"\n [ngStyle]=\"\n (maxHeight >= 0 && {\n 'height.px': maxHeight,\n 'max-height.px': maxHeight,\n }) ||\n null\n \"\n>\n <div #maxHeighContainer>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host-context{margin-bottom:1rem;display:flex;flex-direction:column}:host-context.collapsed i{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host-context.collapsed .content{max-height:0px!important;overflow:hidden!important}:host-context:not(.collapsed) .content{animation:show .15s}.title{-webkit-user-select:none;user-select:none}.title i{margin-right:.5rem;padding-top:.25rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1));transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.title h6{margin-bottom:0;display:inline;height:3rem;cursor:pointer;text-overflow:ellipsis;white-space:nowrap;padding-left:.25rem;padding-right:.5rem;font-size:1.125rem;text-transform:uppercase;line-height:3rem}.content{box-sizing:content-box;flex-grow:1;overflow-y:hidden;padding-left:.25rem;padding-right:.25rem}.content.animate{transition-property:max-height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.content div{padding-bottom:.25rem}@media(min-width:1024px){.content div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}}@media(min-width:1280px){.content div{grid-template-columns:repeat(3,minmax(0,1fr))}}.content div{height:100%}@keyframes show{0%{overflow:hidden}99%{overflow:hidden}to{overflow:auto}}\n"] }]
|
|
2648
2569
|
}], propDecorators: { containerElementRef: [{
|
|
2649
2570
|
type: ViewChild,
|
|
2650
2571
|
args: ['container']
|
|
@@ -2675,12 +2596,12 @@ class ScrollSpyDirective {
|
|
|
2675
2596
|
const scrollTop = event.target.scrollTop;
|
|
2676
2597
|
const scrollHeight = event.target.scrollHeight;
|
|
2677
2598
|
const maxScroll = Math.round(event.target.scrollHeight - event.target.getBoundingClientRect().height);
|
|
2678
|
-
const currentScroll = Math.round(scrollTop * scrollHeight / maxScroll);
|
|
2599
|
+
const currentScroll = Math.round((scrollTop * scrollHeight) / maxScroll);
|
|
2679
2600
|
if (currentScroll >= scrollHeight) {
|
|
2680
2601
|
this.select(this.sections.length - 1);
|
|
2681
2602
|
return;
|
|
2682
2603
|
}
|
|
2683
|
-
const elements = this.sections.filter(el =>
|
|
2604
|
+
const elements = this.sections.filter((el) => el.offsetTop <= currentScroll);
|
|
2684
2605
|
this.select(elements.length > 0 ? elements.length - 1 : 0);
|
|
2685
2606
|
}
|
|
2686
2607
|
//#endregion
|
|
@@ -2697,8 +2618,8 @@ class ScrollSpyDirective {
|
|
|
2697
2618
|
//#endregion
|
|
2698
2619
|
//#region Private methods
|
|
2699
2620
|
updateSections(children) {
|
|
2700
|
-
children.forEach(el => {
|
|
2701
|
-
if (this.spiedTags.some(spiedTag => spiedTag.toUpperCase() === el.tagName.toUpperCase())) {
|
|
2621
|
+
children.forEach((el) => {
|
|
2622
|
+
if (this.spiedTags.some((spiedTag) => spiedTag.toUpperCase() === el.tagName.toUpperCase())) {
|
|
2702
2623
|
this.sections.push(el);
|
|
2703
2624
|
}
|
|
2704
2625
|
else {
|
|
@@ -2706,13 +2627,13 @@ class ScrollSpyDirective {
|
|
|
2706
2627
|
}
|
|
2707
2628
|
});
|
|
2708
2629
|
}
|
|
2709
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2710
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2630
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollSpyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2631
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: ScrollSpyDirective, isStandalone: true, selector: "[libScrollSpy]", inputs: { spiedTags: "spiedTags" }, outputs: { activeSectionChange: "activeSectionChange" }, host: { listeners: { "scroll": "onScroll($event)" } }, ngImport: i0 });
|
|
2711
2632
|
}
|
|
2712
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollSpyDirective, decorators: [{
|
|
2713
2634
|
type: Directive,
|
|
2714
2635
|
args: [{
|
|
2715
|
-
selector: '[libScrollSpy]'
|
|
2636
|
+
selector: '[libScrollSpy]',
|
|
2716
2637
|
}]
|
|
2717
2638
|
}], propDecorators: { spiedTags: [{
|
|
2718
2639
|
type: Input
|
|
@@ -2727,7 +2648,7 @@ class GroupContainerComponent {
|
|
|
2727
2648
|
scrollSpy;
|
|
2728
2649
|
sections;
|
|
2729
2650
|
get titles() {
|
|
2730
|
-
return this.sections?.map(x => x.label) ?? [];
|
|
2651
|
+
return this.sections?.map((x) => x.label) ?? [];
|
|
2731
2652
|
}
|
|
2732
2653
|
activeSection = 0;
|
|
2733
2654
|
title;
|
|
@@ -2738,16 +2659,12 @@ class GroupContainerComponent {
|
|
|
2738
2659
|
scrollTo(section) {
|
|
2739
2660
|
this.scrollSpy.scrollTo(section);
|
|
2740
2661
|
}
|
|
2741
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2742
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2663
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: GroupContainerComponent, isStandalone: true, selector: "lib-group-container", inputs: { title: "title", icon: "icon" }, queries: [{ propertyName: "sections", predicate: GroupAccordionComponent, descendants: true }], viewQueries: [{ propertyName: "scrollSpy", first: true, predicate: ScrollSpyDirective, descendants: true }], ngImport: i0, template: "<div class=\"title\">\n @if (!!title && !!icon) {\n <i class=\"fas fa-fw\" [ngClass]=\"icon\"></i>\n }\n @if (!!title) {\n <h4>{{ title | translate }}</h4>\n }\n @if (!title) {\n <svg [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n }\n</div>\n\n<div class=\"content-container\">\n <ng-content></ng-content>\n</div>\n", styles: [":host-context{position:relative;display:flex;flex-grow:1;flex-direction:column;overflow:hidden;border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;background-color:#fffc}.title{display:flex;height:2rem;align-items:center;text-overflow:ellipsis;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem .5rem}.title i{padding-right:.5rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.title h4{font-weight:600}.title svg{height:1.25rem;width:1.25rem}@keyframes spin{to{transform:rotate(360deg)}}.title svg{animation:spin 1s linear infinite}.content-container{position:relative;display:flex;flex-grow:1;overflow:hidden}.content-container ::ng-deep>*{flex-grow:1;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2743
2664
|
}
|
|
2744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupContainerComponent, decorators: [{
|
|
2745
2666
|
type: Component,
|
|
2746
|
-
args: [{ selector: 'lib-group-container', imports: [
|
|
2747
|
-
NgClass,
|
|
2748
|
-
NgIf,
|
|
2749
|
-
TranslatePipe,
|
|
2750
|
-
], template: "<div class=\"title\">\n <i *ngIf=\"!!title && !!icon\" class=\"fas fa-fw\" [ngClass]=\"icon\"></i>\n\n <h4 *ngIf=\"!!title\">{{ title | translate }}</h4>\n\n <svg *ngIf=\"!title\" [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n</div>\n\n<div class=\"content-container\">\n <ng-content></ng-content>\n</div>", styles: [":host-context{position:relative;display:flex;flex-grow:1;flex-direction:column;overflow:hidden;border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;background-color:#fffc}.title{display:flex;height:2rem;align-items:center;text-overflow:ellipsis;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem .5rem}.title i{padding-right:.5rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.title h4{font-weight:600}.title svg{height:1.25rem;width:1.25rem}@keyframes spin{to{transform:rotate(360deg)}}.title svg{animation:spin 1s linear infinite}.content-container{position:relative;display:flex;flex-grow:1;overflow:hidden}.content-container ::ng-deep>*{flex-grow:1;overflow:hidden}\n"] }]
|
|
2667
|
+
args: [{ selector: 'lib-group-container', imports: [NgClass, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"title\">\n @if (!!title && !!icon) {\n <i class=\"fas fa-fw\" [ngClass]=\"icon\"></i>\n }\n @if (!!title) {\n <h4>{{ title | translate }}</h4>\n }\n @if (!title) {\n <svg [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n }\n</div>\n\n<div class=\"content-container\">\n <ng-content></ng-content>\n</div>\n", styles: [":host-context{position:relative;display:flex;flex-grow:1;flex-direction:column;overflow:hidden;border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;background-color:#fffc}.title{display:flex;height:2rem;align-items:center;text-overflow:ellipsis;border-bottom-width:1px;border-color:#d1d5dbe6;padding:.25rem .5rem}.title i{padding-right:.5rem;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.title h4{font-weight:600}.title svg{height:1.25rem;width:1.25rem}@keyframes spin{to{transform:rotate(360deg)}}.title svg{animation:spin 1s linear infinite}.content-container{position:relative;display:flex;flex-grow:1;overflow:hidden}.content-container ::ng-deep>*{flex-grow:1;overflow:hidden}\n"] }]
|
|
2751
2668
|
}], propDecorators: { scrollSpy: [{
|
|
2752
2669
|
type: ViewChild,
|
|
2753
2670
|
args: [ScrollSpyDirective]
|
|
@@ -2764,7 +2681,7 @@ class GroupScrollSpyComponent {
|
|
|
2764
2681
|
scrollSpy;
|
|
2765
2682
|
sections;
|
|
2766
2683
|
get titles() {
|
|
2767
|
-
return this.sections?.map(x => x.label) ?? [];
|
|
2684
|
+
return this.sections?.map((x) => x.label) ?? [];
|
|
2768
2685
|
}
|
|
2769
2686
|
activeSection = 0;
|
|
2770
2687
|
activeSectionChanged(index) {
|
|
@@ -2773,15 +2690,12 @@ class GroupScrollSpyComponent {
|
|
|
2773
2690
|
scrollTo(section) {
|
|
2774
2691
|
this.scrollSpy.scrollTo(section);
|
|
2775
2692
|
}
|
|
2776
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2777
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2693
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupScrollSpyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2694
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: GroupScrollSpyComponent, isStandalone: true, selector: "lib-group-scroll-spy", queries: [{ propertyName: "sections", predicate: GroupAccordionComponent, descendants: true }], viewQueries: [{ propertyName: "scrollSpy", first: true, predicate: ScrollSpyDirective, descendants: true }], ngImport: i0, template: "<div class=\"scroll-spy\">\n @for (title of titles; track title; let i = $index) {\n <a\n class=\"item\"\n [class.active]=\"i === activeSection\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-current]=\"i === activeSection\"\n (click)=\"scrollTo(i)\"\n (keydown.enter)=\"scrollTo(i)\"\n (keydown.space)=\"scrollTo(i); $event.preventDefault()\"\n >{{ title }}</a\n >\n }\n</div>\n\n<div\n class=\"content\"\n libScrollSpy\n [class.no-scroll-spy]=\"titles.length === 0\"\n [spiedTags]=\"['lib-group-accordion']\"\n (activeSectionChange)=\"activeSectionChanged($event)\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host-context{position:relative;display:flex;height:100%;max-height:100%;min-height:100%;flex-grow:1;overflow:hidden}.content{display:flex;flex-grow:1;flex-direction:column;overflow:auto;scroll-behavior:smooth;padding:.75rem .75rem .25rem}@media(min-width:768px){.content{padding-right:10.5rem}.content.no-scroll-spy{padding-right:.75rem}}.scroll-spy{position:absolute;top:.75rem;right:.75rem;display:none;width:9rem;-webkit-user-select:none;user-select:none;flex-direction:column}@media(min-width:768px){.scroll-spy{display:flex}}.scroll-spy a{cursor:pointer;border-left-width:2px;--tw-border-opacity: 1;border-left-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.scroll-spy a.active{--tw-border-opacity: 1;border-left-color:rgb(0 107 182 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(0 107 182 / var(--tw-text-opacity, 1))}.scroll-spy a:active{background-color:#006bb61a}\n"], dependencies: [{ kind: "directive", type: ScrollSpyDirective, selector: "[libScrollSpy]", inputs: ["spiedTags"], outputs: ["activeSectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2778
2695
|
}
|
|
2779
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2696
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: GroupScrollSpyComponent, decorators: [{
|
|
2780
2697
|
type: Component,
|
|
2781
|
-
args: [{ selector: 'lib-group-scroll-spy', imports: [
|
|
2782
|
-
NgFor,
|
|
2783
|
-
ScrollSpyDirective,
|
|
2784
|
-
], template: "<div class=\"scroll-spy\">\n <a *ngFor=\"let title of titles; let i = index\"\n class=\"item\" [class.active]=\"i === activeSection\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-current]=\"i === activeSection\"\n (click)=\"scrollTo(i)\"\n (keydown.enter)=\"scrollTo(i)\"\n (keydown.space)=\"scrollTo(i); $event.preventDefault()\"\n >{{ title }}</a>\n</div>\n\n<div class=\"content\" libScrollSpy\n[class.no-scroll-spy]=\"titles.length === 0\"\n[spiedTags]=\"['lib-group-accordion']\"\n(activeSectionChange)=\"activeSectionChanged($event)\"\n>\n <ng-content></ng-content>\n</div>", styles: [":host-context{position:relative;display:flex;height:100%;max-height:100%;min-height:100%;flex-grow:1;overflow:hidden}.content{display:flex;flex-grow:1;flex-direction:column;overflow:auto;scroll-behavior:smooth;padding:.75rem .75rem .25rem}@media (min-width: 768px){.content{padding-right:10.5rem}.content.no-scroll-spy{padding-right:.75rem}}.scroll-spy{position:absolute;top:.75rem;right:.75rem;display:none;width:9rem;-webkit-user-select:none;user-select:none;flex-direction:column}@media (min-width: 768px){.scroll-spy{display:flex}}.scroll-spy a{cursor:pointer;border-left-width:2px;--tw-border-opacity: 1;border-left-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.scroll-spy a.active{--tw-border-opacity: 1;border-left-color:rgb(0 107 182 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(0 107 182 / var(--tw-text-opacity, 1))}.scroll-spy a:active{background-color:#006bb61a}\n"] }]
|
|
2698
|
+
args: [{ selector: 'lib-group-scroll-spy', changeDetection: ChangeDetectionStrategy.Eager, imports: [ScrollSpyDirective], template: "<div class=\"scroll-spy\">\n @for (title of titles; track title; let i = $index) {\n <a\n class=\"item\"\n [class.active]=\"i === activeSection\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-current]=\"i === activeSection\"\n (click)=\"scrollTo(i)\"\n (keydown.enter)=\"scrollTo(i)\"\n (keydown.space)=\"scrollTo(i); $event.preventDefault()\"\n >{{ title }}</a\n >\n }\n</div>\n\n<div\n class=\"content\"\n libScrollSpy\n [class.no-scroll-spy]=\"titles.length === 0\"\n [spiedTags]=\"['lib-group-accordion']\"\n (activeSectionChange)=\"activeSectionChanged($event)\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [":host-context{position:relative;display:flex;height:100%;max-height:100%;min-height:100%;flex-grow:1;overflow:hidden}.content{display:flex;flex-grow:1;flex-direction:column;overflow:auto;scroll-behavior:smooth;padding:.75rem .75rem .25rem}@media(min-width:768px){.content{padding-right:10.5rem}.content.no-scroll-spy{padding-right:.75rem}}.scroll-spy{position:absolute;top:.75rem;right:.75rem;display:none;width:9rem;-webkit-user-select:none;user-select:none;flex-direction:column}@media(min-width:768px){.scroll-spy{display:flex}}.scroll-spy a{cursor:pointer;border-left-width:2px;--tw-border-opacity: 1;border-left-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.scroll-spy a.active{--tw-border-opacity: 1;border-left-color:rgb(0 107 182 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(0 107 182 / var(--tw-text-opacity, 1))}.scroll-spy a:active{background-color:#006bb61a}\n"] }]
|
|
2785
2699
|
}], propDecorators: { scrollSpy: [{
|
|
2786
2700
|
type: ViewChild,
|
|
2787
2701
|
args: [ScrollSpyDirective]
|
|
@@ -2852,7 +2766,12 @@ class ModalComponent extends BaseComponent {
|
|
|
2852
2766
|
bodyMouseDown(event) {
|
|
2853
2767
|
if (this.dialog && this.isShown) {
|
|
2854
2768
|
const target = event.target;
|
|
2855
|
-
this.clickedOutside =
|
|
2769
|
+
this.clickedOutside =
|
|
2770
|
+
(!this.modalProcessing &&
|
|
2771
|
+
event.button === 0 &&
|
|
2772
|
+
target.closest('lib-modal') &&
|
|
2773
|
+
!target.closest('.modal-content')) ??
|
|
2774
|
+
false;
|
|
2856
2775
|
}
|
|
2857
2776
|
}
|
|
2858
2777
|
bodyMouseUp(event) {
|
|
@@ -2864,28 +2783,21 @@ class ModalComponent extends BaseComponent {
|
|
|
2864
2783
|
}
|
|
2865
2784
|
documentKeyDown(event) {
|
|
2866
2785
|
event = event || window.event;
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
isEscape = (event.key === 'Escape' || event.key === 'Esc');
|
|
2870
|
-
}
|
|
2871
|
-
else {
|
|
2872
|
-
isEscape = (event.keyCode === 27);
|
|
2873
|
-
}
|
|
2786
|
+
// keyCode is the fallback for engines predating KeyboardEvent.key.
|
|
2787
|
+
const isEscape = 'key' in event ? event.key === 'Escape' || event.key === 'Esc' : event.keyCode === 27;
|
|
2874
2788
|
if (!this.modalProcessing && this.isShown && isEscape && document.body.classList.contains('modal-active')) {
|
|
2875
2789
|
this.toggleModal();
|
|
2876
2790
|
}
|
|
2877
2791
|
}
|
|
2878
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2879
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2792
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2793
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ModalComponent, isStandalone: true, selector: "lib-modal", inputs: { closeButtonText: "closeButtonText", dialog: "dialog", modalProcessing: "modalProcessing", position: "position", size: "size", title: "title" }, outputs: { closed: "closed" }, host: { attributes: { "title": "" }, listeners: { "body:mousedown": "bodyMouseDown($event)", "body:mouseup": "bodyMouseUp($event)", "document:keydown.escape": "documentKeyDown($event)" }, properties: { "class.show": "isShown" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"modal-overlay\"></div>\n\n<div class=\"modal-container size-{{ size }} {{ position }}\">\n <form class=\"modal-content\">\n @if (title) {\n <div class=\"modal-header\">\n <p class=\"text-2xl font-bold\">{{ title }}</p>\n <button type=\"button\" class=\"modal-close\" (click)=\"toggleModal()\">\n <svg\n class=\"fill-current text-black\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n >\n <path\n d=\"M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z\"\n ></path>\n </svg>\n </button>\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn gray-300\" [disabled]=\"modalProcessing\" (click)=\"onCloseClick()\">\n {{ closeButtonText }}\n </button>\n\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </form>\n</div>\n", styles: ["body.modal-active{overflow-x:hidden;overflow-y:visible!important}:host{position:fixed;top:0;left:0;z-index:50;height:100%;width:100%}:host:not(.show){pointer-events:none;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-delay:.15s}:host:not(.show) .modal-overlay{opacity:0;transition-delay:.15s}:host:not(.show) .modal-container.top,:host:not(.show) .modal-container.center{--tw-translate-y: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.bottom{--tw-translate-y: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.left{--tw-translate-x: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.right{--tw-translate-x: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container .modal-content{animation:hidden 0s ease-in-out forwards}.modal-overlay{position:fixed;inset:0;height:100vh;width:100vw;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));opacity:.5;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.modal-container{margin:auto;display:grid;height:100%;max-height:100vh;min-height:100%;grid-template-columns:repeat(1,minmax(0,1fr));padding:1.75rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.modal-container.top{align-items:flex-start}.modal-container.bottom{align-items:flex-end}.modal-container.left{margin-right:0;align-items:center}.modal-container.right{margin-left:0;align-items:center}.modal-container.center{align-items:center}.modal-container.size-sm{max-width:24rem}.modal-container.size-md{max-width:28rem}.modal-container.size-lg{max-width:32rem}.modal-container.size-xl{max-width:36rem}.modal-container.size-2xl{max-width:42rem}.modal-container.size-3xl{max-width:48rem}.modal-container.size-4xl{max-width:56rem}.modal-container.size-5xl{max-width:64rem}.modal-container.size-6xl{max-width:72rem}.modal-container.size-7xl{max-width:80rem}.modal-container.size-full{max-width:100%}.modal-container.size-auto{width:100%}@media(min-width:640px){.modal-container.size-auto{max-width:640px}}@media(min-width:768px){.modal-container.size-auto{max-width:768px}}@media(min-width:1024px){.modal-container.size-auto{max-width:1024px}}@media(min-width:1280px){.modal-container.size-auto{max-width:1280px}}@media(min-width:1536px){.modal-container.size-auto{max-width:1536px}}.modal-container .modal-content{position:relative;width:100%;border-radius:.375rem;border-width:1px;border-color:#0003;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));background-clip:padding-box;outline-width:0px;display:grid;max-height:100%;grid-template-rows:min-content 1fr min-content;overflow:hidden;--tw-shadow: 0 0 4px 0 rgba(0,0,0,.2), 0 3px 20px 0 rgba(0,0,0,.19);--tw-shadow-colored: 0 0 4px 0 var(--tw-shadow-color), 0 3px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);animation:shown .3s ease-in-out forwards}.modal-container .modal-content .modal-header{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:1rem}.modal-container .modal-content .modal-header .modal-close{position:absolute;top:0;right:0;margin:.5rem;cursor:pointer;padding:.5rem;opacity:.6}.modal-container .modal-content .modal-body{overflow:hidden;padding:1rem}.modal-container .modal-content .modal-footer{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;justify-content:flex-end;gap:.25rem;white-space:nowrap;border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.75rem}.modal-container .modal-content .modal-footer>*,.modal-container .modal-content .modal-footer ::ng-deep div[footer]>*{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;gap:.25rem}@keyframes hidden{0%{display:flex}to{display:none}}@keyframes shown{0%{opacity:0}to{opacity:1}}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
2880
2794
|
}
|
|
2881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
2882
2796
|
type: Component,
|
|
2883
2797
|
args: [{ selector: 'lib-modal', host: {
|
|
2884
|
-
|
|
2798
|
+
title: '', // This is to ensure that the title input does not conflict with the native HTML title attribute.
|
|
2885
2799
|
'[class.show]': 'isShown',
|
|
2886
|
-
}, imports: [
|
|
2887
|
-
NgIf,
|
|
2888
|
-
], template: "<div class=\"modal-overlay\"></div>\n\n<div class=\"modal-container size-{{ size }} {{ position }}\">\n <form class=\"modal-content\">\n <div class=\"modal-header\" *ngIf=\"title\">\n <p class=\"text-2xl font-bold\">{{ title }}</p>\n\n <button type=\"button\" class=\"modal-close\" (click)=\"toggleModal()\">\n <svg class=\"fill-current text-black\" xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 18 18\">\n <path d=\"M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn gray-300\" [disabled]=\"modalProcessing\" (click)=\"onCloseClick()\">{{ closeButtonText }}</button>\n\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </form>\n</div>", styles: ["body.modal-active{overflow-x:hidden;overflow-y:visible!important}:host{position:fixed;top:0;left:0;z-index:50;height:100%;width:100%}:host:not(.show){pointer-events:none;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-delay:.15s}:host:not(.show) .modal-overlay{opacity:0;transition-delay:.15s}:host:not(.show) .modal-container.top,:host:not(.show) .modal-container.center{--tw-translate-y: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.bottom{--tw-translate-y: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.left{--tw-translate-x: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.right{--tw-translate-x: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container .modal-content{animation:hidden 0s ease-in-out forwards}.modal-overlay{position:fixed;inset:0;height:100vh;width:100vw;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));opacity:.5;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.modal-container{margin:auto;display:grid;height:100%;max-height:100vh;min-height:100%;grid-template-columns:repeat(1,minmax(0,1fr));padding:1.75rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.modal-container.top{align-items:flex-start}.modal-container.bottom{align-items:flex-end}.modal-container.left{margin-right:0;align-items:center}.modal-container.right{margin-left:0;align-items:center}.modal-container.center{align-items:center}.modal-container.size-sm{max-width:24rem}.modal-container.size-md{max-width:28rem}.modal-container.size-lg{max-width:32rem}.modal-container.size-xl{max-width:36rem}.modal-container.size-2xl{max-width:42rem}.modal-container.size-3xl{max-width:48rem}.modal-container.size-4xl{max-width:56rem}.modal-container.size-5xl{max-width:64rem}.modal-container.size-6xl{max-width:72rem}.modal-container.size-7xl{max-width:80rem}.modal-container.size-full{max-width:100%}.modal-container.size-auto{width:100%}@media (min-width: 640px){.modal-container.size-auto{max-width:640px}}@media (min-width: 768px){.modal-container.size-auto{max-width:768px}}@media (min-width: 1024px){.modal-container.size-auto{max-width:1024px}}@media (min-width: 1280px){.modal-container.size-auto{max-width:1280px}}@media (min-width: 1536px){.modal-container.size-auto{max-width:1536px}}.modal-container .modal-content{position:relative;width:100%;border-radius:.375rem;border-width:1px;border-color:#0003;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));background-clip:padding-box;outline-width:0px;display:grid;max-height:100%;grid-template-rows:min-content 1fr min-content;overflow:hidden;--tw-shadow: 0 0 4px 0 rgba(0,0,0,.2), 0 3px 20px 0 rgba(0,0,0,.19);--tw-shadow-colored: 0 0 4px 0 var(--tw-shadow-color), 0 3px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);animation:shown .3s ease-in-out forwards}.modal-container .modal-content .modal-header{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:1rem}.modal-container .modal-content .modal-header .modal-close{position:absolute;top:0;right:0;margin:.5rem;cursor:pointer;padding:.5rem;opacity:.6}.modal-container .modal-content .modal-body{overflow:hidden;padding:1rem}.modal-container .modal-content .modal-footer{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;justify-content:flex-end;gap:.25rem;white-space:nowrap;border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.75rem}.modal-container .modal-content .modal-footer>*,.modal-container .modal-content .modal-footer ::ng-deep div[footer]>*{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;gap:.25rem}@keyframes hidden{0%{display:flex}to{display:none}}@keyframes shown{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
2800
|
+
}, changeDetection: ChangeDetectionStrategy.Eager, imports: [], template: "<div class=\"modal-overlay\"></div>\n\n<div class=\"modal-container size-{{ size }} {{ position }}\">\n <form class=\"modal-content\">\n @if (title) {\n <div class=\"modal-header\">\n <p class=\"text-2xl font-bold\">{{ title }}</p>\n <button type=\"button\" class=\"modal-close\" (click)=\"toggleModal()\">\n <svg\n class=\"fill-current text-black\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"18\"\n height=\"18\"\n viewBox=\"0 0 18 18\"\n >\n <path\n d=\"M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z\"\n ></path>\n </svg>\n </button>\n </div>\n }\n\n <div class=\"modal-body\">\n <ng-content select=\"[body]\"></ng-content>\n </div>\n\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn gray-300\" [disabled]=\"modalProcessing\" (click)=\"onCloseClick()\">\n {{ closeButtonText }}\n </button>\n\n <ng-content select=\"[footer]\"></ng-content>\n </div>\n </form>\n</div>\n", styles: ["body.modal-active{overflow-x:hidden;overflow-y:visible!important}:host{position:fixed;top:0;left:0;z-index:50;height:100%;width:100%}:host:not(.show){pointer-events:none;opacity:0;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-delay:.15s}:host:not(.show) .modal-overlay{opacity:0;transition-delay:.15s}:host:not(.show) .modal-container.top,:host:not(.show) .modal-container.center{--tw-translate-y: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.bottom{--tw-translate-y: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.left{--tw-translate-x: -3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container.right{--tw-translate-x: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host:not(.show) .modal-container .modal-content{animation:hidden 0s ease-in-out forwards}.modal-overlay{position:fixed;inset:0;height:100vh;width:100vw;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));opacity:.5;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.modal-container{margin:auto;display:grid;height:100%;max-height:100vh;min-height:100%;grid-template-columns:repeat(1,minmax(0,1fr));padding:1.75rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.modal-container.top{align-items:flex-start}.modal-container.bottom{align-items:flex-end}.modal-container.left{margin-right:0;align-items:center}.modal-container.right{margin-left:0;align-items:center}.modal-container.center{align-items:center}.modal-container.size-sm{max-width:24rem}.modal-container.size-md{max-width:28rem}.modal-container.size-lg{max-width:32rem}.modal-container.size-xl{max-width:36rem}.modal-container.size-2xl{max-width:42rem}.modal-container.size-3xl{max-width:48rem}.modal-container.size-4xl{max-width:56rem}.modal-container.size-5xl{max-width:64rem}.modal-container.size-6xl{max-width:72rem}.modal-container.size-7xl{max-width:80rem}.modal-container.size-full{max-width:100%}.modal-container.size-auto{width:100%}@media(min-width:640px){.modal-container.size-auto{max-width:640px}}@media(min-width:768px){.modal-container.size-auto{max-width:768px}}@media(min-width:1024px){.modal-container.size-auto{max-width:1024px}}@media(min-width:1280px){.modal-container.size-auto{max-width:1280px}}@media(min-width:1536px){.modal-container.size-auto{max-width:1536px}}.modal-container .modal-content{position:relative;width:100%;border-radius:.375rem;border-width:1px;border-color:#0003;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));background-clip:padding-box;outline-width:0px;display:grid;max-height:100%;grid-template-rows:min-content 1fr min-content;overflow:hidden;--tw-shadow: 0 0 4px 0 rgba(0,0,0,.2), 0 3px 20px 0 rgba(0,0,0,.19);--tw-shadow-colored: 0 0 4px 0 var(--tw-shadow-color), 0 3px 20px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);animation:shown .3s ease-in-out forwards}.modal-container .modal-content .modal-header{border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:1rem}.modal-container .modal-content .modal-header .modal-close{position:absolute;top:0;right:0;margin:.5rem;cursor:pointer;padding:.5rem;opacity:.6}.modal-container .modal-content .modal-body{overflow:hidden;padding:1rem}.modal-container .modal-content .modal-footer{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;justify-content:flex-end;gap:.25rem;white-space:nowrap;border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding:.75rem}.modal-container .modal-content .modal-footer>*,.modal-container .modal-content .modal-footer ::ng-deep div[footer]>*{display:grid;grid-auto-columns:min-content;grid-auto-flow:column;gap:.25rem}@keyframes hidden{0%{display:flex}to{display:none}}@keyframes shown{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
2889
2801
|
}], ctorParameters: () => [], propDecorators: { closeButtonText: [{
|
|
2890
2802
|
type: Input
|
|
2891
2803
|
}], dialog: [{
|
|
@@ -2941,17 +2853,13 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
2941
2853
|
super();
|
|
2942
2854
|
}
|
|
2943
2855
|
ngOnInit() {
|
|
2944
|
-
this.dataGridDataset.loadFinished
|
|
2945
|
-
.pipe(takeUntil(this.destroy$))
|
|
2946
|
-
.subscribe(() => {
|
|
2856
|
+
this.dataGridDataset.loadFinished.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
2947
2857
|
this.multiEditorDataset.clearChangedValues();
|
|
2948
2858
|
this.gridLoading = false;
|
|
2949
2859
|
this.selectedKey = undefined;
|
|
2950
2860
|
this.selectedValue = undefined;
|
|
2951
2861
|
});
|
|
2952
|
-
this.dataGridDataset.selectedRowsChanged
|
|
2953
|
-
.pipe(takeUntil(this.destroy$))
|
|
2954
|
-
.subscribe(() => {
|
|
2862
|
+
this.dataGridDataset.selectedRowsChanged.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
2955
2863
|
if (this.gridLoading || !this.dataGridDataset.hasLoadedRows || !this.dataGridDataset.hasSelectedRows) {
|
|
2956
2864
|
return;
|
|
2957
2865
|
}
|
|
@@ -2959,7 +2867,10 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
2959
2867
|
this.formGroup.enable();
|
|
2960
2868
|
}
|
|
2961
2869
|
const selectedRowKey = this.dataGridDataset.selectedRowKeys[0];
|
|
2962
|
-
if (!!this.selectedKey &&
|
|
2870
|
+
if (!!this.selectedKey &&
|
|
2871
|
+
this.formGroup.enabled &&
|
|
2872
|
+
!this.formGroup.valid &&
|
|
2873
|
+
this.selectedKey !== selectedRowKey) {
|
|
2963
2874
|
// If the form is invalid, need to stay in the same selected row.
|
|
2964
2875
|
this.dataGridDataset.selectRow(this.selectedKey);
|
|
2965
2876
|
this.formGroup.markAllAsTouched();
|
|
@@ -2972,9 +2883,7 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
2972
2883
|
this.formGroup.patchValue(this.selectedValue);
|
|
2973
2884
|
}
|
|
2974
2885
|
});
|
|
2975
|
-
this.formGroup.valueChanges
|
|
2976
|
-
.pipe(takeUntil(this.destroy$))
|
|
2977
|
-
.subscribe((_) => {
|
|
2886
|
+
this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((_) => {
|
|
2978
2887
|
if (this.selectedKey && this.formGroup.dirty) {
|
|
2979
2888
|
this.multiEditorDataset.updateValues(this.selectedKey, this.formGroup.getRawValue());
|
|
2980
2889
|
}
|
|
@@ -3025,7 +2934,8 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
3025
2934
|
if (!this.selectedKey || this.formGroup.valid) {
|
|
3026
2935
|
this.modalProcessing = true;
|
|
3027
2936
|
this.formGroup.disable();
|
|
3028
|
-
this.multiEditorDataset
|
|
2937
|
+
this.multiEditorDataset
|
|
2938
|
+
.saveChanges()
|
|
3029
2939
|
.pipe(take(1))
|
|
3030
2940
|
.subscribe({
|
|
3031
2941
|
next: (_) => {
|
|
@@ -3039,7 +2949,7 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
3039
2949
|
this.dataGridDataset.selectRowID(e.error.entityKey);
|
|
3040
2950
|
this.formService.setValidationErrorsFromHttpResponse(e);
|
|
3041
2951
|
}
|
|
3042
|
-
}
|
|
2952
|
+
},
|
|
3043
2953
|
});
|
|
3044
2954
|
}
|
|
3045
2955
|
}
|
|
@@ -3073,18 +2983,12 @@ class MultiEditorComponent extends ModalComponent {
|
|
|
3073
2983
|
}
|
|
3074
2984
|
});
|
|
3075
2985
|
}
|
|
3076
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3077
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2986
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2987
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MultiEditorComponent, isStandalone: true, selector: "lib-multi-editor", inputs: { addButtonLabel: "addButtonLabel", formGroup: "formGroup", removeButtonLabel: "removeButtonLabel", showAddButton: "showAddButton", showDeleteButton: "showDeleteButton" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ModalComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-modal\n [closeButtonText]=\"closeButtonText | translate\"\n [dialog]=\"dialog\"\n [modalProcessing]=\"modalProcessing\"\n [position]=\"position\"\n [size]=\"size\"\n [title]=\"title\"\n>\n <div body class=\"body-content\">\n <div class=\"data-grid\">\n <lib-data-grid [disabled]=\"modalProcessing\" [lazyLoadRows]=\"true\"></lib-data-grid>\n </div>\n\n <div class=\"data\">\n <div class=\"buttons\">\n @if (showAddButton) {\n <button\n class=\"btn gray-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n [disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n (click)=\"onNewClick()\"\n >\n {{ addButtonLabel }}\n </button>\n }\n @if (showDeleteButton && hasSelectedKey) {\n <button\n class=\"btn red-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading\"\n [disabled]=\"modalProcessing || gridLoading || formLoading\"\n (click)=\"onDeleteClick()\"\n >\n {{ removeButtonLabel }}\n </button>\n }\n </div>\n\n <lib-form-group>\n <ng-content></ng-content>\n </lib-form-group>\n </div>\n </div>\n\n <div footer>\n <button\n class=\"btn blue-500\"\n type=\"button\"\n [class.disabled]=\"gridLoading || formLoading\"\n [class.loading]=\"modalProcessing\"\n (click)=\"onSaveClick()\"\n >\n {{ 'Button-Modal-MultiEditor-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>\n", styles: [".body-content{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;-webkit-user-select:none;user-select:none;overflow:hidden}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:.5rem}.data .buttons{display:grid;grid-auto-columns:auto;grid-auto-flow:column;gap:.5rem;border-bottom-color:#d1d5dbe6}\n"], dependencies: [{ kind: "component", type: DataGridComponent, selector: "lib-data-grid", inputs: ["disabled", "lazyLoadRows", "showButtons"] }, { kind: "component", type: ModalComponent, selector: "lib-modal", inputs: ["closeButtonText", "dialog", "modalProcessing", "position", "size", "title"], outputs: ["closed"] }, { kind: "component", type: FormGroupComponent, selector: "lib-form-group", inputs: ["shouldExpand", "label"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3078
2988
|
}
|
|
3079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiEditorComponent, decorators: [{
|
|
3080
2990
|
type: Component,
|
|
3081
|
-
args: [{ selector: 'lib-multi-editor', imports: [
|
|
3082
|
-
DataGridComponent,
|
|
3083
|
-
ModalComponent,
|
|
3084
|
-
NgIf,
|
|
3085
|
-
FormGroupComponent,
|
|
3086
|
-
TranslatePipe,
|
|
3087
|
-
], template: "<lib-modal\n[closeButtonText]=\"closeButtonText | translate\"\n[dialog]=\"dialog\"\n[modalProcessing]=\"modalProcessing\"\n[position]=\"position\"\n[size]=\"size\"\n[title]=\"title\">\n <div body class=\"body-content\">\n <div class=\"data-grid\">\n <lib-data-grid [disabled]=\"modalProcessing\" [lazyLoadRows]=\"true\"></lib-data-grid>\n </div>\n\n <div class=\"data\">\n <div class=\"buttons\">\n <button *ngIf=\"showAddButton\"\n class=\"btn gray-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n [disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n (click)=\"onNewClick()\">\n {{ addButtonLabel }}\n </button>\n\n <button *ngIf=\"showDeleteButton && hasSelectedKey\"\n class=\"btn red-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading\"\n [disabled]=\"modalProcessing || gridLoading || formLoading\"\n (click)=\"onDeleteClick()\">\n {{ removeButtonLabel }}\n </button>\n </div>\n\n <lib-form-group>\n <ng-content></ng-content>\n </lib-form-group>\n </div>\n </div>\n\n <div footer>\n <button\n class=\"btn blue-500\"\n type=\"button\"\n [class.disabled]=\"gridLoading || formLoading\"\n [class.loading]=\"modalProcessing\"\n (click)=\"onSaveClick()\">\n {{ 'Button-Modal-MultiEditor-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>", styles: [".body-content{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;-webkit-user-select:none;user-select:none;overflow:hidden}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:.5rem}.data .buttons{display:grid;grid-auto-columns:auto;grid-auto-flow:column;gap:.5rem;border-bottom-color:#d1d5dbe6}\n"] }]
|
|
2991
|
+
args: [{ selector: 'lib-multi-editor', changeDetection: ChangeDetectionStrategy.Eager, imports: [DataGridComponent, ModalComponent, FormGroupComponent, TranslatePipe], template: "<lib-modal\n [closeButtonText]=\"closeButtonText | translate\"\n [dialog]=\"dialog\"\n [modalProcessing]=\"modalProcessing\"\n [position]=\"position\"\n [size]=\"size\"\n [title]=\"title\"\n>\n <div body class=\"body-content\">\n <div class=\"data-grid\">\n <lib-data-grid [disabled]=\"modalProcessing\" [lazyLoadRows]=\"true\"></lib-data-grid>\n </div>\n\n <div class=\"data\">\n <div class=\"buttons\">\n @if (showAddButton) {\n <button\n class=\"btn gray-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n [disabled]=\"modalProcessing || gridLoading || formLoading || formGroup.invalid\"\n (click)=\"onNewClick()\"\n >\n {{ addButtonLabel }}\n </button>\n }\n @if (showDeleteButton && hasSelectedKey) {\n <button\n class=\"btn red-500\"\n type=\"button\"\n [class.disabled]=\"modalProcessing || gridLoading || formLoading\"\n [disabled]=\"modalProcessing || gridLoading || formLoading\"\n (click)=\"onDeleteClick()\"\n >\n {{ removeButtonLabel }}\n </button>\n }\n </div>\n\n <lib-form-group>\n <ng-content></ng-content>\n </lib-form-group>\n </div>\n </div>\n\n <div footer>\n <button\n class=\"btn blue-500\"\n type=\"button\"\n [class.disabled]=\"gridLoading || formLoading\"\n [class.loading]=\"modalProcessing\"\n (click)=\"onSaveClick()\"\n >\n {{ 'Button-Modal-MultiEditor-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>\n", styles: [".body-content{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;overflow:clip;overflow-clip-margin:4px}.data-grid{display:grid;-webkit-user-select:none;user-select:none;overflow:hidden}.data{display:grid;-webkit-user-select:none;user-select:none;overflow:clip;overflow-clip-margin:4px;min-height:24rem;grid-template-rows:min-content minmax(0,1fr);gap:.5rem}.data .buttons{display:grid;grid-auto-columns:auto;grid-auto-flow:column;gap:.5rem;border-bottom-color:#d1d5dbe6}\n"] }]
|
|
3088
2992
|
}], ctorParameters: () => [], propDecorators: { modal: [{
|
|
3089
2993
|
type: ViewChild,
|
|
3090
2994
|
args: [ModalComponent]
|
|
@@ -3117,14 +3021,10 @@ class MultiSelectResultGridComponent extends BaseComponent {
|
|
|
3117
3021
|
super();
|
|
3118
3022
|
}
|
|
3119
3023
|
ngOnInit() {
|
|
3120
|
-
this.resultDataset.loadStarted
|
|
3121
|
-
.pipe(takeUntil(this.destroy$))
|
|
3122
|
-
.subscribe(() => {
|
|
3024
|
+
this.resultDataset.loadStarted.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
3123
3025
|
this.isLoading = true;
|
|
3124
3026
|
});
|
|
3125
|
-
this.resultDataset.loadFinished
|
|
3126
|
-
.pipe(takeUntil(this.destroy$))
|
|
3127
|
-
.subscribe(() => {
|
|
3027
|
+
this.resultDataset.loadFinished.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
3128
3028
|
this.isLoading = false;
|
|
3129
3029
|
});
|
|
3130
3030
|
}
|
|
@@ -3142,19 +3042,14 @@ class MultiSelectResultGridComponent extends BaseComponent {
|
|
|
3142
3042
|
this.resultDataset.loadRows();
|
|
3143
3043
|
}
|
|
3144
3044
|
}
|
|
3145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3045
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectResultGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3046
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: MultiSelectResultGridComponent, isStandalone: true, selector: "lib-multi-select-result-grid", inputs: { isDisabled: "isDisabled", template: "template" }, host: { classAttribute: "flex-grow" }, usesInheritance: true, ngImport: i0, template: "<div class=\"body\" (scroll)=\"onScrolled($event)\">\n @for (row of resultDataset.displayedRows; track row; let i = $index) {\n <div class=\"row\">\n <div class=\"cell\">\n <button\n class=\"remove\"\n type=\"button\"\n [class.disabled]=\"isDisabled\"\n [disabled]=\"isDisabled\"\n (click)=\"onItemRemoved(i)\"\n >\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n <div class=\"cell\">\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { rowData: row }\"> </ng-container>\n </div>\n </div>\n </div>\n }\n @if (isLoading) {\n <div class=\"loading\">\n <svg [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ resultDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n</div>\n", styles: [":host-context{display:grid;-webkit-user-select:none;user-select:none;grid-template-rows:auto 1fr;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.body{overflow:overlay}.body .row{border-bottom-width:1px;border-color:#cbd5e180;margin-top:0;cursor:pointer;display:grid;grid-auto-flow:column;grid-template-columns:min-content minmax(0,1fr);gap:1rem;padding:.5rem 1rem}.body .row:nth-child(2n){background-color:#f8fafcb3}.body .row:hover{background-color:#bfdbfe33}.body .row.focused{z-index:1;border-color:#94a3b899}.body .row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body .row.selected:hover{background-color:#bfdbfe66}.body .row .cell{white-space:nowrap;display:flex;align-items:center}.body .row .cell a{padding-left:.5rem;padding-right:.5rem;font-size:1.125rem;line-height:1.75rem}.body .row .cell a:not(.disabled){cursor:pointer}.body .row .cell a.disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.body .row .cell .remove{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1));cursor:pointer;border-style:none;background-color:transparent;padding:0}.body .row .cell.disabled{pointer-events:none;cursor:default;opacity:.6}.body .row .cell>*{overflow:hidden;text-overflow:ellipsis}.body .row .cell div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body .loading{margin-bottom:.5rem;display:flex;height:2.5rem;align-items:center;border-bottom-width:1px;border-color:#cbd5e180;padding-left:1rem;padding-right:1rem}.body .loading svg{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.body .loading span{padding-left:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3147
3047
|
}
|
|
3148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectResultGridComponent, decorators: [{
|
|
3149
3049
|
type: Component,
|
|
3150
3050
|
args: [{ selector: 'lib-multi-select-result-grid', host: {
|
|
3151
|
-
|
|
3152
|
-
}, imports: [
|
|
3153
|
-
CommonModule,
|
|
3154
|
-
NgFor,
|
|
3155
|
-
NgIf,
|
|
3156
|
-
TranslatePipe,
|
|
3157
|
-
], template: "<div\nclass=\"body\"\n(scroll)=\"onScrolled($event)\">\n <div\n class=\"row\"\n *ngFor=\"let row of resultDataset.displayedRows; let i = index\">\n <div class=\"cell\">\n <button\n class=\"remove\"\n type=\"button\"\n [class.disabled]=\"isDisabled\"\n [disabled]=\"isDisabled\"\n (click)=\"onItemRemoved(i)\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div> \n\n <div class=\"cell\">\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { rowData: row }\">\n </ng-container>\n </div>\n </div>\n </div>\n\n <div\n class=\"loading\"\n *ngIf=\"isLoading\">\n <svg [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n\n <span>\n {{ resultDataset.configs.loadingDisplayText ?? '' | translate }} \n </span>\n </div>\n</div>", styles: [":host-context{display:grid;-webkit-user-select:none;user-select:none;grid-template-rows:auto 1fr;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.body{overflow:overlay}.body .row{border-bottom-width:1px;border-color:#cbd5e180;margin-top:0;cursor:pointer;display:grid;grid-auto-flow:column;grid-template-columns:min-content minmax(0,1fr);gap:1rem;padding:.5rem 1rem}.body .row:nth-child(2n){background-color:#f8fafcb3}.body .row:hover{background-color:#bfdbfe33}.body .row.focused{z-index:1;border-color:#94a3b899}.body .row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body .row.selected:hover{background-color:#bfdbfe66}.body .row .cell{white-space:nowrap;display:flex;align-items:center}.body .row .cell a{padding-left:.5rem;padding-right:.5rem;font-size:1.125rem;line-height:1.75rem}.body .row .cell a:not(.disabled){cursor:pointer}.body .row .cell a.disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.body .row .cell .remove{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1));cursor:pointer;border-style:none;background-color:transparent;padding:0}.body .row .cell.disabled{pointer-events:none;cursor:default;opacity:.6}.body .row .cell>*{overflow:hidden;text-overflow:ellipsis}.body .row .cell div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body .loading{margin-bottom:.5rem;display:flex;height:2.5rem;align-items:center;border-bottom-width:1px;border-color:#cbd5e180;padding-left:1rem;padding-right:1rem}.body .loading svg{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.body .loading span{padding-left:.5rem}\n"] }]
|
|
3051
|
+
class: 'flex-grow',
|
|
3052
|
+
}, changeDetection: ChangeDetectionStrategy.Eager, imports: [CommonModule, TranslatePipe], template: "<div class=\"body\" (scroll)=\"onScrolled($event)\">\n @for (row of resultDataset.displayedRows; track row; let i = $index) {\n <div class=\"row\">\n <div class=\"cell\">\n <button\n class=\"remove\"\n type=\"button\"\n [class.disabled]=\"isDisabled\"\n [disabled]=\"isDisabled\"\n (click)=\"onItemRemoved(i)\"\n >\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n <div class=\"cell\">\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { rowData: row }\"> </ng-container>\n </div>\n </div>\n </div>\n }\n @if (isLoading) {\n <div class=\"loading\">\n <svg [ngClass]=\"''\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>\n {{ resultDataset.configs.loadingDisplayText ?? '' | translate }}\n </span>\n </div>\n }\n</div>\n", styles: [":host-context{display:grid;-webkit-user-select:none;user-select:none;grid-template-rows:auto 1fr;overflow:hidden}:host-context:not(.no-borders){border-radius:.5rem;border-width:1px;border-color:#d1d5dbe6;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.body{overflow:overlay}.body .row{border-bottom-width:1px;border-color:#cbd5e180;margin-top:0;cursor:pointer;display:grid;grid-auto-flow:column;grid-template-columns:min-content minmax(0,1fr);gap:1rem;padding:.5rem 1rem}.body .row:nth-child(2n){background-color:#f8fafcb3}.body .row:hover{background-color:#bfdbfe33}.body .row.focused{z-index:1;border-color:#94a3b899}.body .row.selected{position:relative;z-index:10;--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1));background-color:#bfdbfe4d}.body .row.selected:hover{background-color:#bfdbfe66}.body .row .cell{white-space:nowrap;display:flex;align-items:center}.body .row .cell a{padding-left:.5rem;padding-right:.5rem;font-size:1.125rem;line-height:1.75rem}.body .row .cell a:not(.disabled){cursor:pointer}.body .row .cell a.disabled{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.body .row .cell .remove{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1));cursor:pointer;border-style:none;background-color:transparent;padding:0}.body .row .cell.disabled{pointer-events:none;cursor:default;opacity:.6}.body .row .cell>*{overflow:hidden;text-overflow:ellipsis}.body .row .cell div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body .loading{margin-bottom:.5rem;display:flex;height:2.5rem;align-items:center;border-bottom-width:1px;border-color:#cbd5e180;padding-left:1rem;padding-right:1rem}.body .loading svg{height:1.5rem;width:1.5rem}@keyframes spin{to{transform:rotate(360deg)}}.body .loading svg{animation:spin 1s linear infinite;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.body .loading span{padding-left:.5rem}\n"] }]
|
|
3158
3053
|
}], ctorParameters: () => [], propDecorators: { isDisabled: [{
|
|
3159
3054
|
type: Input
|
|
3160
3055
|
}], template: [{
|
|
@@ -3191,20 +3086,14 @@ class MultiSelectComponent extends ModalComponent {
|
|
|
3191
3086
|
this.closeButtonText = 'Button-Modal-Cancel';
|
|
3192
3087
|
}
|
|
3193
3088
|
ngOnInit() {
|
|
3194
|
-
this.dataGridDataset.loadStarted
|
|
3195
|
-
.pipe(takeUntil(this.destroy$))
|
|
3196
|
-
.subscribe(() => {
|
|
3089
|
+
this.dataGridDataset.loadStarted.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
3197
3090
|
this.isSearchGridLoading = true;
|
|
3198
3091
|
});
|
|
3199
|
-
this.dataGridDataset.loadFinished
|
|
3200
|
-
.pipe(takeUntil(this.destroy$))
|
|
3201
|
-
.subscribe(() => {
|
|
3092
|
+
this.dataGridDataset.loadFinished.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
3202
3093
|
this.isSearchGridLoading = false;
|
|
3203
3094
|
this.updateSelectedItems();
|
|
3204
3095
|
});
|
|
3205
|
-
this.resultDataset.loadFinished
|
|
3206
|
-
.pipe(takeUntil(this.destroy$))
|
|
3207
|
-
.subscribe(() => {
|
|
3096
|
+
this.resultDataset.loadFinished.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
3208
3097
|
this.isResultGridLoading = false;
|
|
3209
3098
|
this.updateSelectedItems();
|
|
3210
3099
|
});
|
|
@@ -3214,8 +3103,7 @@ class MultiSelectComponent extends ModalComponent {
|
|
|
3214
3103
|
if (this.isSearchGridLoading || this.isResultGridLoading) {
|
|
3215
3104
|
return;
|
|
3216
3105
|
}
|
|
3217
|
-
Object.keys(selectionChanges)
|
|
3218
|
-
.forEach((key) => {
|
|
3106
|
+
Object.keys(selectionChanges).forEach((key) => {
|
|
3219
3107
|
const selection = selectionChanges[key];
|
|
3220
3108
|
const id = this.dataGridDataset.getRowID(key);
|
|
3221
3109
|
if (selection.selected) {
|
|
@@ -3231,7 +3119,8 @@ class MultiSelectComponent extends ModalComponent {
|
|
|
3231
3119
|
//#region Event handlers
|
|
3232
3120
|
onSave() {
|
|
3233
3121
|
this.modalProcessing = true;
|
|
3234
|
-
this.resultDataset
|
|
3122
|
+
this.resultDataset
|
|
3123
|
+
.saveChanges()
|
|
3235
3124
|
.pipe(take(1))
|
|
3236
3125
|
.subscribe(() => {
|
|
3237
3126
|
this.modalProcessing = false;
|
|
@@ -3282,22 +3171,15 @@ class MultiSelectComponent extends ModalComponent {
|
|
|
3282
3171
|
.filter((id) => this.resultDataset.idsToRemove.indexOf(id) < 0);
|
|
3283
3172
|
idsFromResult.push(...this.resultDataset.idsToAdd);
|
|
3284
3173
|
// Get each corresponding key from the data grid.
|
|
3285
|
-
const keysToSelect = (this.dataGridDataset.loadedKeys ?? [])
|
|
3286
|
-
.filter((key) => idsFromResult.indexOf(this.dataGridDataset.getRowID(key)) >= 0);
|
|
3174
|
+
const keysToSelect = (this.dataGridDataset.loadedKeys ?? []).filter((key) => idsFromResult.indexOf(this.dataGridDataset.getRowID(key)) >= 0);
|
|
3287
3175
|
this.dataGridDataset.selectRows(keysToSelect);
|
|
3288
3176
|
}
|
|
3289
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3290
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3178
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: MultiSelectComponent, isStandalone: true, selector: "lib-multi-select", inputs: { itemTemplate: "itemTemplate" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ModalComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<lib-modal\n [closeButtonText]=\"closeButtonText | translate\"\n [dialog]=\"dialog\"\n [modalProcessing]=\"modalProcessing\"\n [position]=\"position\"\n [size]=\"size\"\n [title]=\"title\"\n>\n <div body class=\"body-content\">\n <div class=\"search-grid\">\n <div class=\"search\">\n <input\n class=\"form-input\"\n placeholder=\"Search...\"\n type=\"text\"\n [(ngModel)]=\"searchCriteria\"\n [disabled]=\"modalProcessing || isSearchGridLoading\"\n (keydown.enter)=\"onSearch()\"\n />\n </div>\n\n <lib-data-grid [disabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\" [lazyLoadRows]=\"true\">\n </lib-data-grid>\n </div>\n\n <lib-multi-select-result-grid\n [isDisabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\"\n [template]=\"itemTemplate\"\n >\n </lib-multi-select-result-grid>\n </div>\n\n <div footer>\n <button class=\"btn blue-500\" type=\"button\" [class.loading]=\"modalProcessing\" (click)=\"onSave()\">\n {{ 'Button-Modal-MultiSelect-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>\n", styles: [".body-content{display:grid;height:100%;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;grid-template-rows:min-content minmax(0,1fr);grid-auto-flow:row!important;overflow:clip;overflow-clip-margin:4px}.search-grid{display:grid;grid-template-rows:subgrid}.search-grid,lib-multi-select-result-grid{grid-row:1 / -1}lib-multi-select-result-grid{min-height:24rem}\n"], dependencies: [{ kind: "component", type: DataGridComponent, selector: "lib-data-grid", inputs: ["disabled", "lazyLoadRows", "showButtons"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ModalComponent, selector: "lib-modal", inputs: ["closeButtonText", "dialog", "modalProcessing", "position", "size", "title"], outputs: ["closed"] }, { kind: "component", type: MultiSelectResultGridComponent, selector: "lib-multi-select-result-grid", inputs: ["isDisabled", "template"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3291
3179
|
}
|
|
3292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
3293
3181
|
type: Component,
|
|
3294
|
-
args: [{ selector: 'lib-multi-select', imports: [
|
|
3295
|
-
DataGridComponent,
|
|
3296
|
-
FormsModule,
|
|
3297
|
-
ModalComponent,
|
|
3298
|
-
MultiSelectResultGridComponent,
|
|
3299
|
-
TranslatePipe,
|
|
3300
|
-
], template: "<lib-modal\n[closeButtonText]=\"closeButtonText | translate\"\n[dialog]=\"dialog\"\n[modalProcessing]=\"modalProcessing\"\n[position]=\"position\"\n[size]=\"size\"\n[title]=\"title\">\n <div body class=\"body-content\">\n <div class=\"search-grid\">\n <div class=\"search\">\n <input\n class=\"form-input\"\n placeholder=\"Search...\"\n type=\"text\"\n [(ngModel)]=\"searchCriteria\"\n [disabled]=\"modalProcessing || isSearchGridLoading\"\n (keydown.enter)=\"onSearch()\" />\n </div>\n \n <lib-data-grid\n [disabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\"\n [lazyLoadRows]=\"true\">\n </lib-data-grid>\n </div>\n\n <lib-multi-select-result-grid\n [isDisabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\"\n [template]=\"itemTemplate\">\n </lib-multi-select-result-grid>\n </div>\n\n <div footer>\n <button\n class=\"btn blue-500\"\n type=\"button\"\n [class.loading]=\"modalProcessing\"\n (click)=\"onSave()\">\n {{ 'Button-Modal-MultiSelect-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>", styles: [".body-content{display:grid;height:100%;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;grid-template-rows:min-content minmax(0,1fr);grid-auto-flow:row!important;overflow:clip;overflow-clip-margin:4px}.search-grid{display:grid;grid-template-rows:subgrid}.search-grid,lib-multi-select-result-grid{grid-row:1 / -1}lib-multi-select-result-grid{min-height:24rem}\n"] }]
|
|
3182
|
+
args: [{ selector: 'lib-multi-select', changeDetection: ChangeDetectionStrategy.Eager, imports: [DataGridComponent, FormsModule, ModalComponent, MultiSelectResultGridComponent, TranslatePipe], template: "<lib-modal\n [closeButtonText]=\"closeButtonText | translate\"\n [dialog]=\"dialog\"\n [modalProcessing]=\"modalProcessing\"\n [position]=\"position\"\n [size]=\"size\"\n [title]=\"title\"\n>\n <div body class=\"body-content\">\n <div class=\"search-grid\">\n <div class=\"search\">\n <input\n class=\"form-input\"\n placeholder=\"Search...\"\n type=\"text\"\n [(ngModel)]=\"searchCriteria\"\n [disabled]=\"modalProcessing || isSearchGridLoading\"\n (keydown.enter)=\"onSearch()\"\n />\n </div>\n\n <lib-data-grid [disabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\" [lazyLoadRows]=\"true\">\n </lib-data-grid>\n </div>\n\n <lib-multi-select-result-grid\n [isDisabled]=\"modalProcessing || isSearchGridLoading || isResultGridLoading\"\n [template]=\"itemTemplate\"\n >\n </lib-multi-select-result-grid>\n </div>\n\n <div footer>\n <button class=\"btn blue-500\" type=\"button\" [class.loading]=\"modalProcessing\" (click)=\"onSave()\">\n {{ 'Button-Modal-MultiSelect-Confirm' | translate }}\n </button>\n </div>\n</lib-modal>\n", styles: [".body-content{display:grid;height:100%;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:1rem;grid-template-rows:min-content minmax(0,1fr);grid-auto-flow:row!important;overflow:clip;overflow-clip-margin:4px}.search-grid{display:grid;grid-template-rows:subgrid}.search-grid,lib-multi-select-result-grid{grid-row:1 / -1}lib-multi-select-result-grid{min-height:24rem}\n"] }]
|
|
3301
3183
|
}], ctorParameters: () => [], propDecorators: { modal: [{
|
|
3302
3184
|
type: ViewChild,
|
|
3303
3185
|
args: [ModalComponent]
|
|
@@ -3341,8 +3223,8 @@ class SidebarItemComponent extends BaseComponent {
|
|
|
3341
3223
|
return this.menu.childCount > 0;
|
|
3342
3224
|
}
|
|
3343
3225
|
get opensInNewBrowserTab() {
|
|
3344
|
-
return (this.menu.url?.length ?? 0) > 0
|
|
3345
|
-
|
|
3226
|
+
return ((this.menu.url?.length ?? 0) > 0 &&
|
|
3227
|
+
toSidebarMenuOpenMode(this.menu.openMode) === SidebarMenuOpenMode.ExternalNewTab);
|
|
3346
3228
|
}
|
|
3347
3229
|
get hasIcon() {
|
|
3348
3230
|
return !!this.menu.icon && this.menu.icon.length > 0;
|
|
@@ -3418,23 +3300,18 @@ class SidebarItemComponent extends BaseComponent {
|
|
|
3418
3300
|
updateSubMenuHeight() {
|
|
3419
3301
|
this._childHeight = this.getChildHeight(this.menu);
|
|
3420
3302
|
}
|
|
3421
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3422
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SidebarItemComponent, isStandalone: true, selector: "lib-sidebar-item", inputs: { isLast: "isLast", level: "level", menu: "menu" }, host: { properties: { "class.active": "isActive", "class.expanded": "!isCollapsed", "class.first-level": "level === 0", "class.last-child": "isLast", "class.selected": "isSelected" } }, viewQueries: [{ propertyName: "menuContainer", first: true, predicate: ["menuContainer"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<li>\n <div\n #menuContainer\n [class.external]=\"opensInNewBrowserTab\"\n [class.failed]=\"hasFailed\"\n [class.loading]=\"isLoading\"\n [class.parent]=\"isParent\"\n [class.selected]=\"isSelected\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-current]=\"isSelected\"\n (click)=\"onSelectItem()\"\n (keydown.enter)=\"onSelectItem()\"\n (keydown.space)=\"onSelectItem(); $event.preventDefault()\"\n >\n <a [attr.title]=\"opensInNewBrowserTab ? externalLinkText : null\">\n @if (hasIcon && level === 0) {\n <i class=\"fa-solid fa-fw {{ menu.icon }}\"></i>\n }\n <span>{{ menu.label | translate }}</span>\n </a>\n\n @if (isParent) {\n <div class=\"loading\">\n <svg class=\"animate-spin text-white\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n </div>\n }\n </div>\n\n @if (isParent) {\n <ul\n [class.open]=\"isSelected\"\n [ngStyle]=\"{\n 'height.px': childHeight,\n 'max-height.px': childHeight,\n }\"\n >\n @for (child of menu.children; track trackByFn($index, child); let last = $last) {\n <lib-sidebar-item [menu]=\"child\" [level]=\"level + 1\" [isLast]=\"last\"> </lib-sidebar-item>\n }\n </ul>\n }\n</li>\n", styles: [":host{position:relative;display:block}@media(max-width:767px){:host:not(.active) li>ul{height:0px!important}}@media(min-width:768px){:host:not(.expanded):not(.active) li>ul{height:0px!important}:host.expanded li>div{margin-inline:.5rem}:host.expanded li>div.external:after{opacity:1}:host.expanded li>div.external a{padding-right:2rem}:host.expanded li>div.parent:not(.loading):after{opacity:1}:host.expanded li>div.parent a{padding-right:2rem}:host.expanded li>div.parent.loading .loading{opacity:1!important}:host.expanded li>div a i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.expanded li>div a span{opacity:1}}:host.active li>div{margin-inline:.5rem}:host.active li>div.external:after{opacity:1}:host.active li>div.external a{padding-right:2rem}:host.active li>div.parent:not(.loading):after{opacity:1}:host.active li>div.parent a{padding-right:2rem}:host.active li>div.parent.loading .loading{opacity:1!important}:host.active li>div a i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.active li>div a span{opacity:1}:host.expanded li .selected:not(.loading).parent:after,:host.active li .selected:not(.loading).parent:after{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}li{position:relative;height:100%}li>div{position:relative;overflow:hidden;height:var(--sidebar-item-height);line-height:var(--sidebar-item-height);border-radius:var(--sidebar-item-radius);transition-property:margin,background-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}li>div:hover{background-color:var(--sidebar-item-hover-bg)}li>div.selected{background-color:var(--sidebar-item-selected-bg);color:var(--sidebar-item-selected-text)}li>div.external:after{position:absolute;top:0;right:.75rem;width:10px;font-size:.75rem;line-height:1rem;font-weight:800;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;--tw-content: \"\\f08e\";content:var(--tw-content);font-family:\"Font Awesome 6 Free\";transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div.parent:after{position:absolute;top:0;right:.75rem;width:10px;font-weight:800;transition-property:opacity,transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;font-family:\"Font Awesome 6 Free\";transition-duration:var(--sidebar-animation-duration);will-change:opacity,transform}li>div.parent:not(.failed):after{--tw-content: \"\\f104\";content:var(--tw-content)}li>div.parent.failed:after{right:1rem;--tw-content: \"\\f071\";content:var(--tw-content)}li>div a{display:block;height:100%;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:.75rem;padding-right:.75rem;text-align:left;width:var(--sidebar-expanded-width)}li>div a i{margin-right:.5rem;font-size:1.25rem;line-height:1.75rem;transition-property:font-size,line-height,margin-left;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:var(--sidebar-icon-collapsed-margin);transition-duration:var(--sidebar-animation-duration);will-change:font-size,line-height,margin-left}li>div a span{text-overflow:ellipsis;opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div .loading{position:absolute;top:0;right:.55rem;height:100%;width:1rem;opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div .loading svg{height:100%;width:100%}li>ul{overflow:hidden;transition-property:height,max-height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:height,max-height}li>ul a{padding-left:1.25rem}:host(:not(.first-level)) li>div>a{position:relative;padding-left:1.5rem}:host(:not(.first-level)) li>div>a:before{content:\"\";position:absolute;left:.6rem;top:0;bottom:0;width:0;border-left:1px solid var(--sidebar-tree-line)}:host(:not(.first-level)) li>div>a:after{content:\"\";position:absolute;left:.6rem;top:calc(50% - .55rem);width:.6rem;height:.55rem;border-left:1px solid var(--sidebar-tree-line);border-bottom:1px solid var(--sidebar-tree-line);border-bottom-left-radius:.4rem}:host(.last-child:not(.first-level)) li>div>a:before{bottom:calc(50% + .4rem)}\n"], dependencies: [{ kind: "component", type: SidebarItemComponent, selector: "lib-sidebar-item", inputs: ["isLast", "level", "menu"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3423
3305
|
}
|
|
3424
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarItemComponent, decorators: [{
|
|
3425
3307
|
type: Component,
|
|
3426
|
-
args: [{ selector: 'lib-sidebar-item', imports: [
|
|
3427
|
-
NgFor,
|
|
3428
|
-
NgIf,
|
|
3429
|
-
NgStyle,
|
|
3430
|
-
TranslatePipe,
|
|
3431
|
-
], host: {
|
|
3308
|
+
args: [{ selector: 'lib-sidebar-item', imports: [NgStyle, TranslatePipe], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
3432
3309
|
'[class.active]': 'isActive',
|
|
3433
3310
|
'[class.expanded]': '!isCollapsed',
|
|
3434
3311
|
'[class.first-level]': 'level === 0',
|
|
3435
3312
|
'[class.last-child]': 'isLast',
|
|
3436
3313
|
'[class.selected]': 'isSelected',
|
|
3437
|
-
}, template: "<li>\n
|
|
3314
|
+
}, template: "<li>\n <div\n #menuContainer\n [class.external]=\"opensInNewBrowserTab\"\n [class.failed]=\"hasFailed\"\n [class.loading]=\"isLoading\"\n [class.parent]=\"isParent\"\n [class.selected]=\"isSelected\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-current]=\"isSelected\"\n (click)=\"onSelectItem()\"\n (keydown.enter)=\"onSelectItem()\"\n (keydown.space)=\"onSelectItem(); $event.preventDefault()\"\n >\n <a [attr.title]=\"opensInNewBrowserTab ? externalLinkText : null\">\n @if (hasIcon && level === 0) {\n <i class=\"fa-solid fa-fw {{ menu.icon }}\"></i>\n }\n <span>{{ menu.label | translate }}</span>\n </a>\n\n @if (isParent) {\n <div class=\"loading\">\n <svg class=\"animate-spin text-white\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n </div>\n }\n </div>\n\n @if (isParent) {\n <ul\n [class.open]=\"isSelected\"\n [ngStyle]=\"{\n 'height.px': childHeight,\n 'max-height.px': childHeight,\n }\"\n >\n @for (child of menu.children; track trackByFn($index, child); let last = $last) {\n <lib-sidebar-item [menu]=\"child\" [level]=\"level + 1\" [isLast]=\"last\"> </lib-sidebar-item>\n }\n </ul>\n }\n</li>\n", styles: [":host{position:relative;display:block}@media(max-width:767px){:host:not(.active) li>ul{height:0px!important}}@media(min-width:768px){:host:not(.expanded):not(.active) li>ul{height:0px!important}:host.expanded li>div{margin-inline:.5rem}:host.expanded li>div.external:after{opacity:1}:host.expanded li>div.external a{padding-right:2rem}:host.expanded li>div.parent:not(.loading):after{opacity:1}:host.expanded li>div.parent a{padding-right:2rem}:host.expanded li>div.parent.loading .loading{opacity:1!important}:host.expanded li>div a i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.expanded li>div a span{opacity:1}}:host.active li>div{margin-inline:.5rem}:host.active li>div.external:after{opacity:1}:host.active li>div.external a{padding-right:2rem}:host.active li>div.parent:not(.loading):after{opacity:1}:host.active li>div.parent a{padding-right:2rem}:host.active li>div.parent.loading .loading{opacity:1!important}:host.active li>div a i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.active li>div a span{opacity:1}:host.expanded li .selected:not(.loading).parent:after,:host.active li .selected:not(.loading).parent:after{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}li{position:relative;height:100%}li>div{position:relative;overflow:hidden;height:var(--sidebar-item-height);line-height:var(--sidebar-item-height);border-radius:var(--sidebar-item-radius);transition-property:margin,background-color;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}li>div:hover{background-color:var(--sidebar-item-hover-bg)}li>div.selected{background-color:var(--sidebar-item-selected-bg);color:var(--sidebar-item-selected-text)}li>div.external:after{position:absolute;top:0;right:.75rem;width:10px;font-size:.75rem;line-height:1rem;font-weight:800;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;--tw-content: \"\\f08e\";content:var(--tw-content);font-family:\"Font Awesome 6 Free\";transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div.parent:after{position:absolute;top:0;right:.75rem;width:10px;font-weight:800;transition-property:opacity,transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;font-family:\"Font Awesome 6 Free\";transition-duration:var(--sidebar-animation-duration);will-change:opacity,transform}li>div.parent:not(.failed):after{--tw-content: \"\\f104\";content:var(--tw-content)}li>div.parent.failed:after{right:1rem;--tw-content: \"\\f071\";content:var(--tw-content)}li>div a{display:block;height:100%;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:.75rem;padding-right:.75rem;text-align:left;width:var(--sidebar-expanded-width)}li>div a i{margin-right:.5rem;font-size:1.25rem;line-height:1.75rem;transition-property:font-size,line-height,margin-left;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:var(--sidebar-icon-collapsed-margin);transition-duration:var(--sidebar-animation-duration);will-change:font-size,line-height,margin-left}li>div a span{text-overflow:ellipsis;opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div .loading{position:absolute;top:0;right:.55rem;height:100%;width:1rem;opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:opacity}li>div .loading svg{height:100%;width:100%}li>ul{overflow:hidden;transition-property:height,max-height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:height,max-height}li>ul a{padding-left:1.25rem}:host(:not(.first-level)) li>div>a{position:relative;padding-left:1.5rem}:host(:not(.first-level)) li>div>a:before{content:\"\";position:absolute;left:.6rem;top:0;bottom:0;width:0;border-left:1px solid var(--sidebar-tree-line)}:host(:not(.first-level)) li>div>a:after{content:\"\";position:absolute;left:.6rem;top:calc(50% - .55rem);width:.6rem;height:.55rem;border-left:1px solid var(--sidebar-tree-line);border-bottom:1px solid var(--sidebar-tree-line);border-bottom-left-radius:.4rem}:host(.last-child:not(.first-level)) li>div>a:before{bottom:calc(50% + .4rem)}\n"] }]
|
|
3438
3315
|
}], ctorParameters: () => [], propDecorators: { menuContainer: [{
|
|
3439
3316
|
type: ViewChild,
|
|
3440
3317
|
args: ['menuContainer']
|
|
@@ -3464,13 +3341,8 @@ class SidebarComponent extends BaseComponent {
|
|
|
3464
3341
|
}
|
|
3465
3342
|
onDocumentKeyDown(event) {
|
|
3466
3343
|
event = event || window.event;
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
isEscapeKey = (event.key === 'Escape' || event.key === 'Esc');
|
|
3470
|
-
}
|
|
3471
|
-
else {
|
|
3472
|
-
isEscapeKey = (event.keyCode === 27);
|
|
3473
|
-
}
|
|
3344
|
+
// keyCode is the fallback for engines predating KeyboardEvent.key.
|
|
3345
|
+
const isEscapeKey = 'key' in event ? event.key === 'Escape' || event.key === 'Esc' : event.keyCode === 27;
|
|
3474
3346
|
if (isEscapeKey) {
|
|
3475
3347
|
this.deactivate();
|
|
3476
3348
|
}
|
|
@@ -3511,14 +3383,15 @@ class SidebarComponent extends BaseComponent {
|
|
|
3511
3383
|
merge(this.sidebarService.menuUrlSelected, this.sidebarService.menuExternalUrlSelected)
|
|
3512
3384
|
.pipe(takeUntil(this.destroy$))
|
|
3513
3385
|
.subscribe((_menu) => this.deactivate());
|
|
3514
|
-
this.sidebarService
|
|
3386
|
+
this.sidebarService
|
|
3387
|
+
.loadRoot()
|
|
3515
3388
|
.pipe(take(1), switchMap((menus) => this.loadAreaChildren(menus)))
|
|
3516
3389
|
.subscribe({
|
|
3517
3390
|
next: (menus) => {
|
|
3518
3391
|
this.menus = menus;
|
|
3519
3392
|
this.regions = this.groupIntoRegions(menus);
|
|
3520
3393
|
},
|
|
3521
|
-
error: () => this.hasFailed = true
|
|
3394
|
+
error: () => (this.hasFailed = true),
|
|
3522
3395
|
});
|
|
3523
3396
|
}
|
|
3524
3397
|
//#endregion
|
|
@@ -3599,8 +3472,7 @@ class SidebarComponent extends BaseComponent {
|
|
|
3599
3472
|
if (areas.length === 0) {
|
|
3600
3473
|
return of(menus);
|
|
3601
3474
|
}
|
|
3602
|
-
return forkJoin(areas.map((area) => this.sidebarService.loadChildrenFor(area)))
|
|
3603
|
-
.pipe(map(() => menus));
|
|
3475
|
+
return forkJoin(areas.map((area) => this.sidebarService.loadChildrenFor(area))).pipe(map(() => menus));
|
|
3604
3476
|
}
|
|
3605
3477
|
deactivate() {
|
|
3606
3478
|
if (this.sidebarService.isActive) {
|
|
@@ -3610,24 +3482,17 @@ class SidebarComponent extends BaseComponent {
|
|
|
3610
3482
|
}
|
|
3611
3483
|
updateShouldActivate() {
|
|
3612
3484
|
this.sidebarService.shouldActivate =
|
|
3613
|
-
(window.innerWidth <= 767 && !this.sidebarService.isCollapsed)
|
|
3614
|
-
|| this.sidebarService.isCollapsed;
|
|
3485
|
+
(window.innerWidth <= 767 && !this.sidebarService.isCollapsed) || this.sidebarService.isCollapsed;
|
|
3615
3486
|
}
|
|
3616
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3617
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3487
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3488
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SidebarComponent, isStandalone: true, selector: "lib-sidebar", host: { listeners: { "body:mousedown": "onBodyMouseDown($event)", "body:mouseup": "onBodyMouseUp($event)", "document:keydown.escape": "onDocumentKeyDown($event)", "window:resize": "onResize($event)" }, properties: { "class.active": "isActive", "class.expanded": "!isCollapsed" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"sidebar-toolbar\">\n <button type=\"button\" class=\"sidebar-toggle\" (click)=\"collapse()\" aria-label=\"Toggle navigation\">\n <i class=\"fa-solid fa-angle-left\" [class.is-collapsed]=\"isCollapsed\"></i>\n </button>\n</div>\n\n<nav>\n @if (!isLoading) {\n <ul>\n @for (region of regions; track trackByRegion($index, region)) {\n @if (region.name) {\n <li class=\"sidebar-region-header\">\n <span>{{ region.name | translate }}</span>\n </li>\n }\n @for (menu of region.items; track trackByFn($index, menu)) {\n <lib-sidebar-item [menu]=\"menu\"> </lib-sidebar-item>\n }\n }\n @if (hasFailed) {\n <div class=\"error\">\n <div>\n <i class=\"fa-solid fa-fw fa-triangle-exclamation\"></i>\n <span>{{ configErrorText }}</span>\n </div>\n </div>\n }\n </ul>\n } @else {\n <div class=\"loading\">\n <div>\n <svg class=\"animate-spin text-white\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>{{ configLoadingText }}</span>\n </div>\n </div>\n }\n</nav>\n\n<div class=\"sidebar-footer\"><ng-content></ng-content></div>\n", styles: [":host{position:relative;z-index:20;display:grid;height:100%;-webkit-user-select:none;user-select:none;background-color:var(--sidebar-bg);border-radius:var(--sidebar-radius, 1.25rem);backdrop-filter:blur(var(--sidebar-blur, 16px));-webkit-backdrop-filter:blur(var(--sidebar-blur, 16px));box-shadow:var(--sidebar-shadow, 0 10px 40px -12px rgba(0, 0, 0, .45));transition-property:margin-left,width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:calc(var(--sidebar-collapsed-width) * -1);transition-duration:var(--sidebar-animation-duration);width:var(--sidebar-collapsed-width);will-change:margin-left,width;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:\"toolbar\" \"nav\" \"footer\"}@media(min-width:768px){:host{margin-left:0}:host.expanded{width:var(--sidebar-expanded-width)}:host.expanded .loading i,:host.expanded .error i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.expanded .loading svg,:host.expanded .error svg{margin-top:-4px;margin-left:1px;height:1.25rem;width:1.25rem}:host.expanded .loading span,:host.expanded .error span{opacity:1}}:host.active{width:var(--sidebar-expanded-width)}:host.active .loading i,:host.active .error i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.active .loading svg,:host.active .error svg{margin-top:-4px;margin-left:1px;height:1.25rem;width:1.25rem}:host.active .loading span,:host.active .error span{opacity:1}:host.expanded,:host.active{margin-left:0}.sidebar-toolbar{display:flex;justify-content:flex-end;padding-top:.5rem;padding-bottom:.5rem;grid-area:toolbar}.sidebar-toolbar .sidebar-toggle{z-index:20;display:flex;height:1.75rem;width:1.75rem;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(0 67 114 / var(--tw-text-opacity, 1));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 0 0 / .05);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.sidebar-toolbar .sidebar-toggle:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(0 47 80 / var(--tw-text-opacity, 1))}.sidebar-toolbar .sidebar-toggle{transform:translate(40%)}.sidebar-toolbar .sidebar-toggle i{font-size:.875rem;line-height:1.25rem;rotate:0deg;transition:rotate var(--sidebar-animation-duration) ease-in-out}.sidebar-toolbar .sidebar-toggle i.is-collapsed{rotate:-180deg}.sidebar-footer{overflow:hidden;white-space:nowrap;padding:.5rem 1rem;text-align:center;font-size:.75rem;line-height:1rem;color:var(--sidebar-text-muted);opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);grid-area:footer}.sidebar-footer:empty{display:none}:host(.expanded) .sidebar-footer,:host(.active) .sidebar-footer{opacity:1}nav{overflow-y:auto;overflow-x:hidden;grid-area:nav;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}nav::-webkit-scrollbar{height:0px;width:7px}nav::-webkit-scrollbar-track{background-color:transparent}nav::-webkit-scrollbar-thumb{background-color:#0003;border-radius:10px;transition:background .2s ease}nav::-webkit-scrollbar-thumb:hover{background-color:#0000008c}nav:hover::-webkit-scrollbar-thumb{background-color:#00000073}@media screen and (max-width:480px){nav{scrollbar-width:thin}nav::-webkit-scrollbar{width:5px}}ul,.loading{position:relative;background-color:var(--sidebar-nav-bg)}ul lib-sidebar-item,.loading,.error{font-weight:500;color:var(--sidebar-text)}.sidebar-region-header{position:relative;display:flex;align-items:center;overflow:hidden;white-space:nowrap;padding-left:1rem;padding-right:1rem;height:2rem;color:var(--sidebar-text-muted);transition-property:height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}.sidebar-region-header span{font-size:.75rem;line-height:1rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}.sidebar-region-header:after{content:\"\";position:absolute;left:50%;top:50%;opacity:0;width:1.75rem;height:1px;transform:translate(-50%,-50%);background:var(--sidebar-text-muted);transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}:host(:not(.expanded):not(.active)) .sidebar-region-header{height:1.25rem}:host(:not(.expanded):not(.active)) .sidebar-region-header span{opacity:0}:host(:not(.expanded):not(.active)) .sidebar-region-header:after{opacity:1}.loading,.error{overflow:hidden;height:var(--sidebar-item-height);line-height:var(--sidebar-item-height)}.loading>div,.error>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:.75rem;padding-right:.75rem;text-align:left;width:var(--sidebar-expanded-width)}.loading i,.error i{margin-right:.5rem;font-size:1.25rem;line-height:1.75rem;transition-property:font-size,line-height,margin-left;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:var(--sidebar-icon-collapsed-margin);transition-duration:var(--sidebar-animation-duration);will-change:font-size,line-height,margin-left}.loading svg,.error svg{margin-top:-4px;margin-left:.5rem;display:inline;height:1.5rem;width:1.5rem;transition-property:height,margin-left,width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:height,margin-left,width}.loading svg+span,.error svg+span{margin-left:.6rem}.loading span,.error span{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;transition-duration:var(--sidebar-animation-duration)}\n"], dependencies: [{ kind: "component", type: SidebarItemComponent, selector: "lib-sidebar-item", inputs: ["isLast", "level", "menu"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3618
3489
|
}
|
|
3619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
3620
3491
|
type: Component,
|
|
3621
|
-
args: [{ selector: 'lib-sidebar', imports: [
|
|
3622
|
-
CommonModule,
|
|
3623
|
-
NgFor,
|
|
3624
|
-
NgIf,
|
|
3625
|
-
SidebarItemComponent,
|
|
3626
|
-
TranslatePipe,
|
|
3627
|
-
], host: {
|
|
3492
|
+
args: [{ selector: 'lib-sidebar', imports: [SidebarItemComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
3628
3493
|
'[class.active]': 'isActive',
|
|
3629
3494
|
'[class.expanded]': '!isCollapsed',
|
|
3630
|
-
}, template: "<div class=\"sidebar-toolbar\">\n
|
|
3495
|
+
}, template: "<div class=\"sidebar-toolbar\">\n <button type=\"button\" class=\"sidebar-toggle\" (click)=\"collapse()\" aria-label=\"Toggle navigation\">\n <i class=\"fa-solid fa-angle-left\" [class.is-collapsed]=\"isCollapsed\"></i>\n </button>\n</div>\n\n<nav>\n @if (!isLoading) {\n <ul>\n @for (region of regions; track trackByRegion($index, region)) {\n @if (region.name) {\n <li class=\"sidebar-region-header\">\n <span>{{ region.name | translate }}</span>\n </li>\n }\n @for (menu of region.items; track trackByFn($index, menu)) {\n <lib-sidebar-item [menu]=\"menu\"> </lib-sidebar-item>\n }\n }\n @if (hasFailed) {\n <div class=\"error\">\n <div>\n <i class=\"fa-solid fa-fw fa-triangle-exclamation\"></i>\n <span>{{ configErrorText }}</span>\n </div>\n </div>\n }\n </ul>\n } @else {\n <div class=\"loading\">\n <div>\n <svg class=\"animate-spin text-white\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n <span>{{ configLoadingText }}</span>\n </div>\n </div>\n }\n</nav>\n\n<div class=\"sidebar-footer\"><ng-content></ng-content></div>\n", styles: [":host{position:relative;z-index:20;display:grid;height:100%;-webkit-user-select:none;user-select:none;background-color:var(--sidebar-bg);border-radius:var(--sidebar-radius, 1.25rem);backdrop-filter:blur(var(--sidebar-blur, 16px));-webkit-backdrop-filter:blur(var(--sidebar-blur, 16px));box-shadow:var(--sidebar-shadow, 0 10px 40px -12px rgba(0, 0, 0, .45));transition-property:margin-left,width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:calc(var(--sidebar-collapsed-width) * -1);transition-duration:var(--sidebar-animation-duration);width:var(--sidebar-collapsed-width);will-change:margin-left,width;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:\"toolbar\" \"nav\" \"footer\"}@media(min-width:768px){:host{margin-left:0}:host.expanded{width:var(--sidebar-expanded-width)}:host.expanded .loading i,:host.expanded .error i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.expanded .loading svg,:host.expanded .error svg{margin-top:-4px;margin-left:1px;height:1.25rem;width:1.25rem}:host.expanded .loading span,:host.expanded .error span{opacity:1}}:host.active{width:var(--sidebar-expanded-width)}:host.active .loading i,:host.active .error i{margin-left:0;font-size:1.125rem;line-height:1.75rem}:host.active .loading svg,:host.active .error svg{margin-top:-4px;margin-left:1px;height:1.25rem;width:1.25rem}:host.active .loading span,:host.active .error span{opacity:1}:host.expanded,:host.active{margin-left:0}.sidebar-toolbar{display:flex;justify-content:flex-end;padding-top:.5rem;padding-bottom:.5rem;grid-area:toolbar}.sidebar-toolbar .sidebar-toggle{z-index:20;display:flex;height:1.75rem;width:1.75rem;flex-shrink:0;cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(0 67 114 / var(--tw-text-opacity, 1));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: rgb(0 0 0 / .05);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.sidebar-toolbar .sidebar-toggle:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(0 47 80 / var(--tw-text-opacity, 1))}.sidebar-toolbar .sidebar-toggle{transform:translate(40%)}.sidebar-toolbar .sidebar-toggle i{font-size:.875rem;line-height:1.25rem;rotate:0deg;transition:rotate var(--sidebar-animation-duration) ease-in-out}.sidebar-toolbar .sidebar-toggle i.is-collapsed{rotate:-180deg}.sidebar-footer{overflow:hidden;white-space:nowrap;padding:.5rem 1rem;text-align:center;font-size:.75rem;line-height:1rem;color:var(--sidebar-text-muted);opacity:0;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);grid-area:footer}.sidebar-footer:empty{display:none}:host(.expanded) .sidebar-footer,:host(.active) .sidebar-footer{opacity:1}nav{overflow-y:auto;overflow-x:hidden;grid-area:nav;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.2) transparent}nav::-webkit-scrollbar{height:0px;width:7px}nav::-webkit-scrollbar-track{background-color:transparent}nav::-webkit-scrollbar-thumb{background-color:#0003;border-radius:10px;transition:background .2s ease}nav::-webkit-scrollbar-thumb:hover{background-color:#0000008c}nav:hover::-webkit-scrollbar-thumb{background-color:#00000073}@media screen and (max-width:480px){nav{scrollbar-width:thin}nav::-webkit-scrollbar{width:5px}}ul,.loading{position:relative;background-color:var(--sidebar-nav-bg)}ul lib-sidebar-item,.loading,.error{font-weight:500;color:var(--sidebar-text)}.sidebar-region-header{position:relative;display:flex;align-items:center;overflow:hidden;white-space:nowrap;padding-left:1rem;padding-right:1rem;height:2rem;color:var(--sidebar-text-muted);transition-property:height;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}.sidebar-region-header span{font-size:.75rem;line-height:1rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}.sidebar-region-header:after{content:\"\";position:absolute;left:50%;top:50%;opacity:0;width:1.75rem;height:1px;transform:translate(-50%,-50%);background:var(--sidebar-text-muted);transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration)}:host(:not(.expanded):not(.active)) .sidebar-region-header{height:1.25rem}:host(:not(.expanded):not(.active)) .sidebar-region-header span{opacity:0}:host(:not(.expanded):not(.active)) .sidebar-region-header:after{opacity:1}.loading,.error{overflow:hidden;height:var(--sidebar-item-height);line-height:var(--sidebar-item-height)}.loading>div,.error>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:.75rem;padding-right:.75rem;text-align:left;width:var(--sidebar-expanded-width)}.loading i,.error i{margin-right:.5rem;font-size:1.25rem;line-height:1.75rem;transition-property:font-size,line-height,margin-left;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);margin-left:var(--sidebar-icon-collapsed-margin);transition-duration:var(--sidebar-animation-duration);will-change:font-size,line-height,margin-left}.loading svg,.error svg{margin-top:-4px;margin-left:.5rem;display:inline;height:1.5rem;width:1.5rem;transition-property:height,margin-left,width;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--sidebar-animation-duration);will-change:height,margin-left,width}.loading svg+span,.error svg+span{margin-left:.6rem}.loading span,.error span{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:0;transition-duration:var(--sidebar-animation-duration)}\n"] }]
|
|
3631
3496
|
}], ctorParameters: () => [], propDecorators: { onBodyMouseDown: [{
|
|
3632
3497
|
type: HostListener,
|
|
3633
3498
|
args: ['body:mousedown', ['$event']]
|
|
@@ -3661,9 +3526,9 @@ class RibbonButtonComponent {
|
|
|
3661
3526
|
const target = event.target;
|
|
3662
3527
|
const button = target.closest('.button-container')?.parentElement;
|
|
3663
3528
|
this.clickedOutside =
|
|
3664
|
-
event.button === 0
|
|
3665
|
-
|
|
3666
|
-
|
|
3529
|
+
event.button === 0 &&
|
|
3530
|
+
!target.closest('.options-dropdown') &&
|
|
3531
|
+
(!button || (!button?.classList.contains('dropdown') && !button?.classList.contains('open')));
|
|
3667
3532
|
}
|
|
3668
3533
|
}
|
|
3669
3534
|
bodyMouseUp(event) {
|
|
@@ -3673,13 +3538,8 @@ class RibbonButtonComponent {
|
|
|
3673
3538
|
}
|
|
3674
3539
|
documentKeyDown(event) {
|
|
3675
3540
|
event = event || window.event;
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
isEscape = (event.key === 'Escape' || event.key === 'Esc');
|
|
3679
|
-
}
|
|
3680
|
-
else {
|
|
3681
|
-
isEscape = (event.keyCode === 27);
|
|
3682
|
-
}
|
|
3541
|
+
// keyCode is the fallback for engines predating KeyboardEvent.key.
|
|
3542
|
+
const isEscape = 'key' in event ? event.key === 'Escape' || event.key === 'Esc' : event.keyCode === 27;
|
|
3683
3543
|
if (this.showDropdown && isEscape) {
|
|
3684
3544
|
this.showDropdown = false;
|
|
3685
3545
|
}
|
|
@@ -3704,7 +3564,9 @@ class RibbonButtonComponent {
|
|
|
3704
3564
|
}
|
|
3705
3565
|
}
|
|
3706
3566
|
get isButtonDisabled() {
|
|
3707
|
-
return this.disabled ||
|
|
3567
|
+
return (this.disabled ||
|
|
3568
|
+
this.loading ||
|
|
3569
|
+
(this.options.length > 0 && !this.options.some((option) => this.isOptionVisible(option))));
|
|
3708
3570
|
}
|
|
3709
3571
|
//#endregion
|
|
3710
3572
|
//#region Constructor and Angular life cycle methods
|
|
@@ -3747,22 +3609,21 @@ class RibbonButtonComponent {
|
|
|
3747
3609
|
return option.isDisabled || ((option.allowedActions?.length ?? 0) > 0 && option.isAccessAllowed === undefined);
|
|
3748
3610
|
}
|
|
3749
3611
|
isOptionVisible(option) {
|
|
3750
|
-
return (option.isVisible ?? true) &&
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3612
|
+
return ((option.isVisible ?? true) &&
|
|
3613
|
+
(option.allowedActions === undefined ||
|
|
3614
|
+
option.allowedActions.length === 0 ||
|
|
3615
|
+
option.isAccessAllowed === true ||
|
|
3616
|
+
(option.isAccessAllowed == undefined && option.allowedActions?.length > 0)));
|
|
3617
|
+
}
|
|
3618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3619
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: RibbonButtonComponent, isStandalone: true, selector: "lib-ribbon-button", inputs: { color: "color", defaultOption: "defaultOption", disabled: "disabled", icon: "icon", iconSize: "iconSize", label: "label", loading: "loading", options: "options", tooltip: "tooltip" }, outputs: { action: "action" }, host: { listeners: { "body:mousedown": "bodyMouseDown($event)", "body:mouseup": "bodyMouseUp($event)", "document:keydown.escape": "documentKeyDown($event)" }, properties: { "class.dropdown": "options.length > 0", "class.show": "showDropdown" } }, ngImport: i0, template: "<div class=\"button-container\" [attr.title]=\"tooltip || null\">\n <a\n class=\"button\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onButtonClicked()\"\n (keydown.enter)=\"onButtonClicked()\"\n (keydown.space)=\"onButtonClicked(); $event.preventDefault()\"\n >\n <span class=\"icon\" [class.loading]=\"loading\">\n <i class=\"fas fa-fw\" [ngClass]=\"[buttonIcon, color]\"></i>\n\n <svg [ngClass]=\"[color]\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n </span>\n\n <span class=\"label\" [class.text-white]=\"status !== null\">\n {{ label | translate }}\n </span>\n </a>\n\n @if (options.length > 0) {\n <a\n class=\"button-dropdown\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"showDropdown\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onShowHideDropdown()\"\n (keydown.enter)=\"onShowHideDropdown()\"\n (keydown.space)=\"onShowHideDropdown(); $event.preventDefault()\"\n >\n <i class=\"fas fa-chevron-down\" [ngClass]=\"[color]\"></i>\n </a>\n }\n</div>\n\n@if (options.length > 0) {\n <ul class=\"options-dropdown\" role=\"menu\">\n @for (option of options; track option; let i = $index) {\n <li\n role=\"menuitem\"\n [attr.tabindex]=\"isOptionDisabled(option) || !isOptionVisible(option) ? -1 : 0\"\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\n [class.default-option]=\"i === defaultOption\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [class.hidden]=\"!isOptionVisible(option)\"\n (click)=\"onOptionClicked(option)\"\n (keydown.enter)=\"onOptionClicked(option)\"\n (keydown.space)=\"onOptionClicked(option); $event.preventDefault()\"\n >\n @if (!!option.icon) {\n <i class=\"fas fa-fw\" [ngClass]=\"[option.icon, color]\"></i>\n }\n {{ option.label | translate }}\n </li>\n }\n </ul>\n}\n", styles: [":host-context.dropdown .button{border-top-right-radius:0;border-bottom-right-radius:0}.button-container{display:flex}.button{border-radius:.5rem;padding-left:.75rem;padding-right:.75rem}.button.success .icon i,.button.success .label,.button.warning .icon i,.button.warning .label,.button.failure .icon i,.button.failure .label{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button.small{padding-left:.5rem;padding-right:.5rem}.button.small .icon i{height:1.75rem;font-size:1.5rem;line-height:2rem}@media(min-width:768px){.button.small .icon i{font-size:1.25rem;line-height:1.75rem}}.button.small .icon svg{height:1.5rem}.button.small .label{font-size:.875rem;line-height:1.25rem}.button .icon{position:relative;display:flex;height:2rem;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-size:2.25rem;line-height:2.5rem}@media(min-width:768px){.button .icon{font-size:1.875rem;line-height:2.25rem}}.button .icon i{transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon svg{position:absolute;height:2rem;width:2rem}@keyframes spin{to{transform:rotate(360deg)}}.button .icon svg{animation:spin 1s linear infinite;opacity:0;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon.loading i{opacity:0}.button .icon.loading svg{opacity:1}.button .label{margin-top:.5rem;text-align:center;--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button-dropdown{justify-content:center;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem;padding-left:.25rem;padding-right:.25rem}.button-dropdown.success i,.button-dropdown.warning i,.button-dropdown.failure i{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button-dropdown.small{font-size:.875rem;line-height:1.25rem}@media(min-width:768px){.button-dropdown.small{font-size:1rem;line-height:1.5rem}}.button,.button-dropdown{display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button:hover,.button-dropdown:hover{background-color:#d1d5dbcc}.button:focus,.button-dropdown:focus{background-color:#d1d5dbcc}.button:active,.button-dropdown:active{background-color:#9ca3af99}.button:disabled,.button.disabled,.button-dropdown:disabled,.button-dropdown.disabled{pointer-events:none;opacity:.6}.button.success,.button-dropdown.success{background-color:#16a34abf}.button.warning,.button-dropdown.warning{background-color:#ca8a04bf}.button.failure,.button-dropdown.failure{background-color:#dc2626bf}.button.small,.button-dropdown.small{padding-top:.25rem;padding-bottom:.25rem}ul{z-index:1;min-width:fit-content;-webkit-user-select:none;user-select:none}ul li{cursor:pointer;white-space:nowrap;padding:.5rem 1rem}ul li.default-option{display:none}ul li.disabled{pointer-events:none;opacity:.6}ul li:hover{--tw-bg-opacity: 1;background-color:rgb(230 244 255 / var(--tw-bg-opacity, 1))}ul li i{margin-right:.25rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3754
3620
|
}
|
|
3755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonButtonComponent, decorators: [{
|
|
3756
3622
|
type: Component,
|
|
3757
3623
|
args: [{ selector: 'lib-ribbon-button', host: {
|
|
3758
3624
|
'[class.dropdown]': 'options.length > 0',
|
|
3759
3625
|
'[class.show]': 'showDropdown',
|
|
3760
|
-
}, imports: [
|
|
3761
|
-
NgClass,
|
|
3762
|
-
NgFor,
|
|
3763
|
-
NgIf,
|
|
3764
|
-
TranslatePipe,
|
|
3765
|
-
], template: "<div class=\"button-container\"\n[attr.title]=\"tooltip || null\">\n <a class=\"button\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onButtonClicked()\"\n (keydown.enter)=\"onButtonClicked()\"\n (keydown.space)=\"onButtonClicked(); $event.preventDefault()\"\n >\n <span class=\"icon\" [class.loading]=\"loading\">\n <i class=\"fas fa-fw\" [ngClass]=\"[ buttonIcon, color ]\"></i>\n \n <svg [ngClass]=\"[ color ]\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path class=\"opacity-75\" fill=\"currentColor\" d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"></path>\n </svg>\n </span>\n \n <span class=\"label\" [class.text-white]=\"status !== null\">\n {{ label | translate }}\n </span>\n </a>\n \n <a class=\"button-dropdown\" *ngIf=\"options.length > 0\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"showDropdown\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onShowHideDropdown()\"\n (keydown.enter)=\"onShowHideDropdown()\"\n (keydown.space)=\"onShowHideDropdown(); $event.preventDefault()\"\n >\n <i class=\"fas fa-chevron-down\" [ngClass]=\"[ color ]\"></i>\n </a>\n</div>\n\n<ul class=\"options-dropdown\" *ngIf=\"options.length > 0\" role=\"menu\">\n <li *ngFor=\"let option of options; let i = index\"\n role=\"menuitem\"\n [attr.tabindex]=\"isOptionDisabled(option) || !isOptionVisible(option) ? -1 : 0\"\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\n [class.default-option]=\"i === defaultOption\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [class.hidden]=\"!isOptionVisible(option)\"\n (click)=\"onOptionClicked(option)\"\n (keydown.enter)=\"onOptionClicked(option)\"\n (keydown.space)=\"onOptionClicked(option); $event.preventDefault()\"\n >\n <i class=\"fas fa-fw\" *ngIf=\"!!option.icon\" [ngClass]=\"[ option.icon, color ]\"></i> {{ option.label | translate }}\n </li>\n</ul>\n", styles: [":host-context.dropdown .button{border-top-right-radius:0;border-bottom-right-radius:0}.button-container{display:flex}.button{border-radius:.5rem;padding-left:.75rem;padding-right:.75rem}.button.success .icon i,.button.success .label,.button.warning .icon i,.button.warning .label,.button.failure .icon i,.button.failure .label{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button.small{padding-left:.5rem;padding-right:.5rem}.button.small .icon i{height:1.75rem;font-size:1.5rem;line-height:2rem}@media (min-width: 768px){.button.small .icon i{font-size:1.25rem;line-height:1.75rem}}.button.small .icon svg{height:1.5rem}.button.small .label{font-size:.875rem;line-height:1.25rem}.button .icon{position:relative;display:flex;height:2rem;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-size:2.25rem;line-height:2.5rem}@media (min-width: 768px){.button .icon{font-size:1.875rem;line-height:2.25rem}}.button .icon i{transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon svg{position:absolute;height:2rem;width:2rem}@keyframes spin{to{transform:rotate(360deg)}}.button .icon svg{animation:spin 1s linear infinite;opacity:0;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon.loading i{opacity:0}.button .icon.loading svg{opacity:1}.button .label{margin-top:.5rem;text-align:center;--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button-dropdown{justify-content:center;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem;padding-left:.25rem;padding-right:.25rem}.button-dropdown.success i,.button-dropdown.warning i,.button-dropdown.failure i{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button-dropdown.small{font-size:.875rem;line-height:1.25rem}@media (min-width: 768px){.button-dropdown.small{font-size:1rem;line-height:1.5rem}}.button,.button-dropdown{display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button:hover,.button-dropdown:hover{background-color:#d1d5dbcc}.button:focus,.button-dropdown:focus{background-color:#d1d5dbcc}.button:active,.button-dropdown:active{background-color:#9ca3af99}.button:disabled,.button.disabled,.button-dropdown:disabled,.button-dropdown.disabled{pointer-events:none;opacity:.6}.button.success,.button-dropdown.success{background-color:#16a34abf}.button.warning,.button-dropdown.warning{background-color:#ca8a04bf}.button.failure,.button-dropdown.failure{background-color:#dc2626bf}.button.small,.button-dropdown.small{padding-top:.25rem;padding-bottom:.25rem}ul{z-index:1;min-width:fit-content;-webkit-user-select:none;user-select:none}ul li{cursor:pointer;white-space:nowrap;padding:.5rem 1rem}ul li.default-option{display:none}ul li.disabled{pointer-events:none;opacity:.6}ul li:hover{--tw-bg-opacity: 1;background-color:rgb(230 244 255 / var(--tw-bg-opacity, 1))}ul li i{margin-right:.25rem}\n"] }]
|
|
3626
|
+
}, changeDetection: ChangeDetectionStrategy.Eager, imports: [NgClass, TranslatePipe], template: "<div class=\"button-container\" [attr.title]=\"tooltip || null\">\n <a\n class=\"button\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onButtonClicked()\"\n (keydown.enter)=\"onButtonClicked()\"\n (keydown.space)=\"onButtonClicked(); $event.preventDefault()\"\n >\n <span class=\"icon\" [class.loading]=\"loading\">\n <i class=\"fas fa-fw\" [ngClass]=\"[buttonIcon, color]\"></i>\n\n <svg [ngClass]=\"[color]\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\">\n <circle class=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" stroke-width=\"4\"></circle>\n <path\n class=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n ></path>\n </svg>\n </span>\n\n <span class=\"label\" [class.text-white]=\"status !== null\">\n {{ label | translate }}\n </span>\n </a>\n\n @if (options.length > 0) {\n <a\n class=\"button-dropdown\"\n role=\"button\"\n [attr.tabindex]=\"isButtonDisabled ? -1 : 0\"\n [attr.aria-disabled]=\"isButtonDisabled\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"showDropdown\"\n [class.disabled]=\"isButtonDisabled\"\n [class.success]=\"status === 'success'\"\n [class.warning]=\"status === 'warning'\"\n [class.failure]=\"status === 'failure'\"\n [class.small]=\"iconSize === 'small'\"\n (click)=\"onShowHideDropdown()\"\n (keydown.enter)=\"onShowHideDropdown()\"\n (keydown.space)=\"onShowHideDropdown(); $event.preventDefault()\"\n >\n <i class=\"fas fa-chevron-down\" [ngClass]=\"[color]\"></i>\n </a>\n }\n</div>\n\n@if (options.length > 0) {\n <ul class=\"options-dropdown\" role=\"menu\">\n @for (option of options; track option; let i = $index) {\n <li\n role=\"menuitem\"\n [attr.tabindex]=\"isOptionDisabled(option) || !isOptionVisible(option) ? -1 : 0\"\n [attr.aria-disabled]=\"isOptionDisabled(option)\"\n [class.default-option]=\"i === defaultOption\"\n [class.disabled]=\"isOptionDisabled(option)\"\n [class.hidden]=\"!isOptionVisible(option)\"\n (click)=\"onOptionClicked(option)\"\n (keydown.enter)=\"onOptionClicked(option)\"\n (keydown.space)=\"onOptionClicked(option); $event.preventDefault()\"\n >\n @if (!!option.icon) {\n <i class=\"fas fa-fw\" [ngClass]=\"[option.icon, color]\"></i>\n }\n {{ option.label | translate }}\n </li>\n }\n </ul>\n}\n", styles: [":host-context.dropdown .button{border-top-right-radius:0;border-bottom-right-radius:0}.button-container{display:flex}.button{border-radius:.5rem;padding-left:.75rem;padding-right:.75rem}.button.success .icon i,.button.success .label,.button.warning .icon i,.button.warning .label,.button.failure .icon i,.button.failure .label{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button.small{padding-left:.5rem;padding-right:.5rem}.button.small .icon i{height:1.75rem;font-size:1.5rem;line-height:2rem}@media(min-width:768px){.button.small .icon i{font-size:1.25rem;line-height:1.75rem}}.button.small .icon svg{height:1.5rem}.button.small .label{font-size:.875rem;line-height:1.25rem}.button .icon{position:relative;display:flex;height:2rem;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-size:2.25rem;line-height:2.5rem}@media(min-width:768px){.button .icon{font-size:1.875rem;line-height:2.25rem}}.button .icon i{transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon svg{position:absolute;height:2rem;width:2rem}@keyframes spin{to{transform:rotate(360deg)}}.button .icon svg{animation:spin 1s linear infinite;opacity:0;transition-property:opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button .icon.loading i{opacity:0}.button .icon.loading svg{opacity:1}.button .label{margin-top:.5rem;text-align:center;--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button-dropdown{justify-content:center;border-top-right-radius:.5rem;border-bottom-right-radius:.5rem;padding-left:.25rem;padding-right:.25rem}.button-dropdown.success i,.button-dropdown.warning i,.button-dropdown.failure i{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.button-dropdown.small{font-size:.875rem;line-height:1.25rem}@media(min-width:768px){.button-dropdown.small{font-size:1rem;line-height:1.5rem}}.button,.button-dropdown{display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;flex-direction:column;padding-top:.5rem;padding-bottom:.5rem;transition-property:all;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.button:hover,.button-dropdown:hover{background-color:#d1d5dbcc}.button:focus,.button-dropdown:focus{background-color:#d1d5dbcc}.button:active,.button-dropdown:active{background-color:#9ca3af99}.button:disabled,.button.disabled,.button-dropdown:disabled,.button-dropdown.disabled{pointer-events:none;opacity:.6}.button.success,.button-dropdown.success{background-color:#16a34abf}.button.warning,.button-dropdown.warning{background-color:#ca8a04bf}.button.failure,.button-dropdown.failure{background-color:#dc2626bf}.button.small,.button-dropdown.small{padding-top:.25rem;padding-bottom:.25rem}ul{z-index:1;min-width:fit-content;-webkit-user-select:none;user-select:none}ul li{cursor:pointer;white-space:nowrap;padding:.5rem 1rem}ul li.default-option{display:none}ul li.disabled{pointer-events:none;opacity:.6}ul li:hover{--tw-bg-opacity: 1;background-color:rgb(230 244 255 / var(--tw-bg-opacity, 1))}ul li i{margin-right:.25rem}\n"] }]
|
|
3766
3627
|
}], propDecorators: { color: [{
|
|
3767
3628
|
type: Input
|
|
3768
3629
|
}], defaultOption: [{
|
|
@@ -3795,12 +3656,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
3795
3656
|
}] } });
|
|
3796
3657
|
|
|
3797
3658
|
class RibbonComponent {
|
|
3798
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3799
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3659
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3660
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: RibbonComponent, isStandalone: true, selector: "lib-ribbon", ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[right]\"></ng-content>\n", styles: ["@charset \"UTF-8\";::ng-deep lib-ribbon:not(:has(lib-ribbon-group:not(.hidden))):not(:has(>div>*:not(lib-ribbon-group))){display:none}:host-context{position:relative;display:flex;flex-direction:row;border-radius:.5rem;border-width:1px;padding:.25rem;border-color:#d1d5dbe6;background-color:#e5e7ebcc;justify-content:space-between}:host-context div{display:inline-flex;gap:.5rem}:host-context ::ng-deep *[right]{display:flex}:host-context ::ng-deep *[right] lib-ribbon-group{margin-right:.5rem;margin-left:0}:host-context ::ng-deep *[right] lib-ribbon-group:first-child{margin-right:0;padding-right:0;padding-left:.5rem}:host-context ::ng-deep *[right] lib-ribbon-group:after{left:-.25rem}:host-context ::ng-deep *[right] lib-ribbon-group lib-ribbon-button .options-dropdown{right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3800
3661
|
}
|
|
3801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonComponent, decorators: [{
|
|
3802
3663
|
type: Component,
|
|
3803
|
-
args: [{ selector: 'lib-ribbon', template: "<div>\n
|
|
3664
|
+
args: [{ selector: 'lib-ribbon', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <ng-content></ng-content>\n</div>\n\n<ng-content select=\"[right]\"></ng-content>\n", styles: ["@charset \"UTF-8\";::ng-deep lib-ribbon:not(:has(lib-ribbon-group:not(.hidden))):not(:has(>div>*:not(lib-ribbon-group))){display:none}:host-context{position:relative;display:flex;flex-direction:row;border-radius:.5rem;border-width:1px;padding:.25rem;border-color:#d1d5dbe6;background-color:#e5e7ebcc;justify-content:space-between}:host-context div{display:inline-flex;gap:.5rem}:host-context ::ng-deep *[right]{display:flex}:host-context ::ng-deep *[right] lib-ribbon-group{margin-right:.5rem;margin-left:0}:host-context ::ng-deep *[right] lib-ribbon-group:first-child{margin-right:0;padding-right:0;padding-left:.5rem}:host-context ::ng-deep *[right] lib-ribbon-group:after{left:-.25rem}:host-context ::ng-deep *[right] lib-ribbon-group lib-ribbon-button .options-dropdown{right:0}\n"] }]
|
|
3804
3665
|
}] });
|
|
3805
3666
|
|
|
3806
3667
|
class RibbonGroupComponent {
|
|
@@ -3814,14 +3675,14 @@ class RibbonGroupComponent {
|
|
|
3814
3675
|
//#endregion
|
|
3815
3676
|
//#region Properties
|
|
3816
3677
|
get hasChildren() {
|
|
3817
|
-
return this.children?.some(x => x.visible) ?? false;
|
|
3678
|
+
return this.children?.some((x) => x.visible) ?? false;
|
|
3818
3679
|
}
|
|
3819
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3820
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3680
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3681
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: RibbonGroupComponent, isStandalone: true, selector: "lib-ribbon-group", inputs: { label: "label" }, host: { properties: { "class.hidden": "!hasChildren" } }, queries: [{ propertyName: "children", predicate: RibbonGroupChild, descendants: true }], ngImport: i0, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n\n<div class=\"label\">\n <span>{{ label }}</span>\n</div>\n", styles: [":host-context{position:relative;padding-right:.5rem}:host-context:after{position:absolute;right:-.25rem;top:.25rem;bottom:.25rem;width:1px;--tw-content: \"\";content:var(--tw-content);background-color:#9ca3af99}:host-context .content{display:flex;flex-direction:row;flex-wrap:nowrap}:host-context .label{-webkit-user-select:none;user-select:none;padding-top:.05rem;text-align:center;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
3821
3682
|
}
|
|
3822
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RibbonGroupComponent, decorators: [{
|
|
3823
3684
|
type: Component,
|
|
3824
|
-
args: [{ selector: 'lib-ribbon-group', host: { '[class.hidden]': '!hasChildren' }, template: "<div class=\"content\">\n
|
|
3685
|
+
args: [{ selector: 'lib-ribbon-group', changeDetection: ChangeDetectionStrategy.Eager, host: { '[class.hidden]': '!hasChildren' }, template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n\n<div class=\"label\">\n <span>{{ label }}</span>\n</div>\n", styles: [":host-context{position:relative;padding-right:.5rem}:host-context:after{position:absolute;right:-.25rem;top:.25rem;bottom:.25rem;width:1px;--tw-content: \"\";content:var(--tw-content);background-color:#9ca3af99}:host-context .content{display:flex;flex-direction:row;flex-wrap:nowrap}:host-context .label{-webkit-user-select:none;user-select:none;padding-top:.05rem;text-align:center;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}\n"] }]
|
|
3825
3686
|
}], propDecorators: { children: [{
|
|
3826
3687
|
type: ContentChildren,
|
|
3827
3688
|
args: [RibbonGroupChild, { descendants: true }]
|
|
@@ -3844,19 +3705,19 @@ class EnumTranslatePipe {
|
|
|
3844
3705
|
//#region Public methods
|
|
3845
3706
|
transform(enumType) {
|
|
3846
3707
|
return Object.keys(enumType)
|
|
3847
|
-
.filter(key => isNaN(Number(key)))
|
|
3848
|
-
.map(key => ({
|
|
3708
|
+
.filter((key) => isNaN(Number(key)))
|
|
3709
|
+
.map((key) => ({
|
|
3849
3710
|
value: enumType[key],
|
|
3850
3711
|
display: this.translate.get(key),
|
|
3851
3712
|
}));
|
|
3852
3713
|
}
|
|
3853
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3854
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
3714
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EnumTranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3715
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: EnumTranslatePipe, isStandalone: true, name: "enumTranslate" });
|
|
3855
3716
|
}
|
|
3856
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: EnumTranslatePipe, decorators: [{
|
|
3857
3718
|
type: Pipe,
|
|
3858
3719
|
args: [{
|
|
3859
|
-
name: 'enumTranslate'
|
|
3720
|
+
name: 'enumTranslate',
|
|
3860
3721
|
}]
|
|
3861
3722
|
}] });
|
|
3862
3723
|
|
|
@@ -3880,13 +3741,13 @@ class ReplaceManyPipe {
|
|
|
3880
3741
|
}
|
|
3881
3742
|
return message;
|
|
3882
3743
|
}
|
|
3883
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3884
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
3744
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ReplaceManyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3745
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: ReplaceManyPipe, isStandalone: true, name: "replaceMany" });
|
|
3885
3746
|
}
|
|
3886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3747
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ReplaceManyPipe, decorators: [{
|
|
3887
3748
|
type: Pipe,
|
|
3888
3749
|
args: [{
|
|
3889
|
-
name: 'replaceMany'
|
|
3750
|
+
name: 'replaceMany',
|
|
3890
3751
|
}]
|
|
3891
3752
|
}] });
|
|
3892
3753
|
|
|
@@ -3905,13 +3766,13 @@ class ReplacePipe {
|
|
|
3905
3766
|
transform(message, searchValue, replaceValue) {
|
|
3906
3767
|
return message.replace(searchValue, replaceValue ?? '');
|
|
3907
3768
|
}
|
|
3908
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3909
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
3769
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3770
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: ReplacePipe, isStandalone: true, name: "replace" });
|
|
3910
3771
|
}
|
|
3911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ReplacePipe, decorators: [{
|
|
3912
3773
|
type: Pipe,
|
|
3913
3774
|
args: [{
|
|
3914
|
-
name: 'replace'
|
|
3775
|
+
name: 'replace',
|
|
3915
3776
|
}]
|
|
3916
3777
|
}] });
|
|
3917
3778
|
|
|
@@ -3920,19 +3781,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
3920
3781
|
* Import individual components directly in your component's `imports` array.
|
|
3921
3782
|
*/
|
|
3922
3783
|
class LibraryModule {
|
|
3923
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3924
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
3925
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
3784
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: LibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3785
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: LibraryModule, imports: [CatalogSelectComponent, DataGridComponent, DataGridRowComponent, FormInputComponent, FormInputGroupComponent, FormGroupComponent, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, SidebarComponent, ModalComponent, MultiEditorComponent, MultiSelectComponent, MultiSelectResultGridComponent, RibbonComponent, RibbonButtonComponent, RibbonGroupComponent, ScrollSpyDirective, EnumTranslatePipe, ReplacePipe, ReplaceManyPipe], exports: [CatalogSelectComponent, DataGridComponent, DataGridRowComponent, FormInputComponent, FormInputGroupComponent, FormGroupComponent, GroupAccordionComponent, GroupContainerComponent, GroupScrollSpyComponent, SidebarComponent, ModalComponent, MultiEditorComponent, MultiSelectComponent, MultiSelectResultGridComponent, RibbonComponent, RibbonButtonComponent, RibbonGroupComponent, ScrollSpyDirective, EnumTranslatePipe, ReplacePipe, ReplaceManyPipe] });
|
|
3786
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: LibraryModule, imports: [CatalogSelectComponent,
|
|
3926
3787
|
DataGridComponent,
|
|
3927
3788
|
DataGridRowComponent,
|
|
3928
3789
|
FormInputComponent,
|
|
3929
3790
|
FormInputGroupComponent,
|
|
3930
|
-
SidebarComponent,
|
|
3931
3791
|
MultiEditorComponent,
|
|
3932
3792
|
MultiSelectComponent,
|
|
3933
3793
|
MultiSelectResultGridComponent] });
|
|
3934
3794
|
}
|
|
3935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: LibraryModule, decorators: [{
|
|
3936
3796
|
type: NgModule,
|
|
3937
3797
|
args: [{
|
|
3938
3798
|
declarations: [],
|
|
@@ -3981,7 +3841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
3981
3841
|
EnumTranslatePipe,
|
|
3982
3842
|
ReplacePipe,
|
|
3983
3843
|
ReplaceManyPipe,
|
|
3984
|
-
]
|
|
3844
|
+
],
|
|
3985
3845
|
}]
|
|
3986
3846
|
}] });
|
|
3987
3847
|
|
|
@@ -3995,17 +3855,16 @@ class DataGridConfigsProvider extends GridConfigsProvider {
|
|
|
3995
3855
|
//#region Constructor and Angular life cycle methods
|
|
3996
3856
|
constructor() {
|
|
3997
3857
|
super();
|
|
3998
|
-
this._configs =
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
};
|
|
3858
|
+
this._configs = {
|
|
3859
|
+
...this._configs,
|
|
3860
|
+
multiSelect: false,
|
|
3861
|
+
multiSelectSize: 'minmax(1.5rem, min-content)',
|
|
3862
|
+
};
|
|
4004
3863
|
}
|
|
4005
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4006
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3864
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridConfigsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3865
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridConfigsProvider });
|
|
4007
3866
|
}
|
|
4008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DataGridConfigsProvider, decorators: [{
|
|
4009
3868
|
type: Injectable
|
|
4010
3869
|
}], ctorParameters: () => [] });
|
|
4011
3870
|
|
|
@@ -4015,7 +3874,7 @@ class DateValidators {
|
|
|
4015
3874
|
return (control) => {
|
|
4016
3875
|
const compareControl = control.parent?.get(controlName);
|
|
4017
3876
|
if (!!control.value && !!compareControl?.value && new Date(control.value) <= new Date(compareControl?.value)) {
|
|
4018
|
-
return {
|
|
3877
|
+
return { greaterThanControl: true };
|
|
4019
3878
|
}
|
|
4020
3879
|
return null;
|
|
4021
3880
|
};
|
|
@@ -4024,7 +3883,7 @@ class DateValidators {
|
|
|
4024
3883
|
return (control) => {
|
|
4025
3884
|
const compareControl = control.parent?.get(controlName);
|
|
4026
3885
|
if (!!control.value && !!compareControl?.value && new Date(control.value) < new Date(compareControl?.value)) {
|
|
4027
|
-
return {
|
|
3886
|
+
return { greaterThanOrEqualControl: true };
|
|
4028
3887
|
}
|
|
4029
3888
|
return null;
|
|
4030
3889
|
};
|
|
@@ -4032,14 +3891,14 @@ class DateValidators {
|
|
|
4032
3891
|
static greaterThanOrEqualToday(control) {
|
|
4033
3892
|
const today = new Date();
|
|
4034
3893
|
if (!!control.value && new Date(control.value) < today) {
|
|
4035
|
-
return {
|
|
3894
|
+
return { greaterThanOrEqualToday: true };
|
|
4036
3895
|
}
|
|
4037
3896
|
return null;
|
|
4038
3897
|
}
|
|
4039
3898
|
static greaterThanToday(control) {
|
|
4040
3899
|
const today = new Date();
|
|
4041
3900
|
if (!!control.value && new Date(control.value) <= today) {
|
|
4042
|
-
return {
|
|
3901
|
+
return { greaterThanToday: true };
|
|
4043
3902
|
}
|
|
4044
3903
|
return null;
|
|
4045
3904
|
}
|
|
@@ -4047,7 +3906,7 @@ class DateValidators {
|
|
|
4047
3906
|
return (control) => {
|
|
4048
3907
|
const compareControl = control.parent?.get(controlName);
|
|
4049
3908
|
if (!!control.value && !!compareControl?.value && new Date(control.value) >= new Date(compareControl?.value)) {
|
|
4050
|
-
return {
|
|
3909
|
+
return { lessThanControl: true };
|
|
4051
3910
|
}
|
|
4052
3911
|
return null;
|
|
4053
3912
|
};
|
|
@@ -4056,7 +3915,7 @@ class DateValidators {
|
|
|
4056
3915
|
return (control) => {
|
|
4057
3916
|
const compareControl = control.parent?.get(controlName);
|
|
4058
3917
|
if (!!control.value && !!compareControl?.value && new Date(control.value) > new Date(compareControl?.value)) {
|
|
4059
|
-
return {
|
|
3918
|
+
return { lessThanOrEqualControl: true };
|
|
4060
3919
|
}
|
|
4061
3920
|
return null;
|
|
4062
3921
|
};
|
|
@@ -4064,21 +3923,21 @@ class DateValidators {
|
|
|
4064
3923
|
static lessThanOrEqualToday(control) {
|
|
4065
3924
|
const today = new Date();
|
|
4066
3925
|
if (!!control.value && new Date(control.value) > today) {
|
|
4067
|
-
return {
|
|
3926
|
+
return { lessThanOrEqualToday: true };
|
|
4068
3927
|
}
|
|
4069
3928
|
return null;
|
|
4070
3929
|
}
|
|
4071
3930
|
static lessThanToday(control) {
|
|
4072
3931
|
const today = new Date();
|
|
4073
3932
|
if (!!control.value && new Date(control.value) >= today) {
|
|
4074
|
-
return {
|
|
3933
|
+
return { lessThanToday: true };
|
|
4075
3934
|
}
|
|
4076
3935
|
return null;
|
|
4077
3936
|
}
|
|
4078
3937
|
static maxDate(maxDate) {
|
|
4079
3938
|
return (control) => {
|
|
4080
3939
|
if (!!control.value && new Date(control.value) > maxDate) {
|
|
4081
|
-
return {
|
|
3940
|
+
return { maxDate: true };
|
|
4082
3941
|
}
|
|
4083
3942
|
return null;
|
|
4084
3943
|
};
|
|
@@ -4086,7 +3945,7 @@ class DateValidators {
|
|
|
4086
3945
|
static minDate(minDate) {
|
|
4087
3946
|
return (control) => {
|
|
4088
3947
|
if (!!control.value && new Date(control.value) < minDate) {
|
|
4089
|
-
return {
|
|
3948
|
+
return { minDate: true };
|
|
4090
3949
|
}
|
|
4091
3950
|
return null;
|
|
4092
3951
|
};
|