@gloww/gloww 20.0.0-beta.22 → 20.0.0-beta.24
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/fesm2022/gloww-gloww.mjs +105 -47
- package/fesm2022/gloww-gloww.mjs.map +1 -1
- package/index.d.ts +28 -9
- package/package.json +1 -1
package/fesm2022/gloww-gloww.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, HostListener, Input, Directive, Pipe, Inject, Component, EventEmitter, Output, HostBinding, ViewChild, ContentChildren,
|
|
3
|
-
import { Subject, firstValueFrom, BehaviorSubject,
|
|
2
|
+
import { InjectionToken, Injectable, HostListener, Input, Directive, Pipe, Inject, Component, EventEmitter, Output, HostBinding, ViewChild, ContentChildren, Optional, PLATFORM_ID, ContentChild, ViewEncapsulation, makeEnvironmentProviders, NgModule, SecurityContext, forwardRef } from '@angular/core';
|
|
3
|
+
import { Subject, firstValueFrom, BehaviorSubject, of, Subscription, combineLatest, forkJoin, throwError } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { HttpClient, HttpParams, HttpEventType, HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, HttpResponse } from '@angular/common/http';
|
|
6
6
|
import * as i3 from '@angular/common';
|
|
@@ -10,6 +10,7 @@ import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, Ma
|
|
|
10
10
|
import { CdkScrollable } from '@angular/cdk/scrolling';
|
|
11
11
|
import * as i2 from '@angular/router';
|
|
12
12
|
import { NavigationEnd, RouterLink, RouterModule } from '@angular/router';
|
|
13
|
+
import * as i2$1 from '@angular/material/button';
|
|
13
14
|
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
14
15
|
import * as i1$1 from '@angular/platform-browser';
|
|
15
16
|
import * as i5 from '@kolkov/angular-editor';
|
|
@@ -28,10 +29,10 @@ import * as i1$3 from '@angular/forms';
|
|
|
28
29
|
import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
29
30
|
import { MatProgressBar, MatProgressBarModule } from '@angular/material/progress-bar';
|
|
30
31
|
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker, MatDatepickerModule } from '@angular/material/datepicker';
|
|
31
|
-
import * as
|
|
32
|
+
import * as i3$1 from 'ngx-mat-datetime-picker-v2';
|
|
32
33
|
import { NgxMatDatetimePickerModule, NgxMatNativeDateModule, NgxMatTimepickerComponent } from 'ngx-mat-datetime-picker-v2';
|
|
33
|
-
import * as
|
|
34
|
-
import {
|
|
34
|
+
import * as i1$4 from '@ngx-translate/core';
|
|
35
|
+
import { TranslateDefaultParser } from '@ngx-translate/core';
|
|
35
36
|
import { MatSelect, MatOption, MatSelectModule } from '@angular/material/select';
|
|
36
37
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
37
38
|
import { MatListItem, MatListItemIcon, MatListItemTitle } from '@angular/material/list';
|
|
@@ -748,8 +749,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
748
749
|
args: [MatColumnDef]
|
|
749
750
|
}] } });
|
|
750
751
|
|
|
752
|
+
class GlowwI18nService {
|
|
753
|
+
constructor(translate) {
|
|
754
|
+
this.translate = translate;
|
|
755
|
+
}
|
|
756
|
+
get langChanges$() {
|
|
757
|
+
return this.translate?.onLangChange ?? of(null);
|
|
758
|
+
}
|
|
759
|
+
instant(key, fallback) {
|
|
760
|
+
if (!this.translate) {
|
|
761
|
+
return fallback;
|
|
762
|
+
}
|
|
763
|
+
const translated = this.translate.instant(key);
|
|
764
|
+
return translated && translated !== key ? translated : fallback;
|
|
765
|
+
}
|
|
766
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwI18nService, deps: [{ token: i1$4.TranslateService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
767
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwI18nService, providedIn: 'root' }); }
|
|
768
|
+
}
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwI18nService, decorators: [{
|
|
770
|
+
type: Injectable,
|
|
771
|
+
args: [{ providedIn: 'root' }]
|
|
772
|
+
}], ctorParameters: () => [{ type: i1$4.TranslateService, decorators: [{
|
|
773
|
+
type: Optional
|
|
774
|
+
}] }] });
|
|
775
|
+
|
|
751
776
|
class FilterFormComponent {
|
|
752
|
-
constructor() {
|
|
777
|
+
constructor(i18n) {
|
|
778
|
+
this.i18n = i18n;
|
|
753
779
|
this.filter = new EventEmitter();
|
|
754
780
|
}
|
|
755
781
|
ngOnInit() {
|
|
@@ -757,13 +783,16 @@ class FilterFormComponent {
|
|
|
757
783
|
onFilter() {
|
|
758
784
|
this.filter.emit("xxx");
|
|
759
785
|
}
|
|
760
|
-
|
|
761
|
-
|
|
786
|
+
get filterLabel() {
|
|
787
|
+
return this.i18n.instant('COMMON.FILTER', 'Filter');
|
|
788
|
+
}
|
|
789
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FilterFormComponent, deps: [{ token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
790
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: FilterFormComponent, isStandalone: true, selector: "glw-filter-form", outputs: { filter: "filter" }, ngImport: i0, template: "<mat-card appearance=\"outlined\">\r\n <mat-card-content>\r\n <ng-content></ng-content>\r\n </mat-card-content>\r\n <mat-card-actions align=\"end\">\n <button mat-stroked-button color=\"accent\" (click)=\"onFilter()\">\n <mat-icon>search</mat-icon>\n {{ filterLabel }}\n </button>\n </mat-card-actions>\n</mat-card>\n", styles: [""], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
762
791
|
}
|
|
763
792
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FilterFormComponent, decorators: [{
|
|
764
793
|
type: Component,
|
|
765
|
-
args: [{ selector: 'glw-filter-form', imports: [MatCard, MatCardContent, MatCardActions, MatButton, MatIcon
|
|
766
|
-
}], ctorParameters: () => [], propDecorators: { filter: [{
|
|
794
|
+
args: [{ selector: 'glw-filter-form', imports: [MatCard, MatCardContent, MatCardActions, MatButton, MatIcon], template: "<mat-card appearance=\"outlined\">\r\n <mat-card-content>\r\n <ng-content></ng-content>\r\n </mat-card-content>\r\n <mat-card-actions align=\"end\">\n <button mat-stroked-button color=\"accent\" (click)=\"onFilter()\">\n <mat-icon>search</mat-icon>\n {{ filterLabel }}\n </button>\n </mat-card-actions>\n</mat-card>\n" }]
|
|
795
|
+
}], ctorParameters: () => [{ type: GlowwI18nService }], propDecorators: { filter: [{
|
|
767
796
|
type: Output
|
|
768
797
|
}] } });
|
|
769
798
|
|
|
@@ -994,7 +1023,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
994
1023
|
|
|
995
1024
|
;
|
|
996
1025
|
class DisplayObjectsComponent {
|
|
997
|
-
constructor(glowwService, changeDetectorRef, dialog, router, location, authenticationService, formBuilder, route,
|
|
1026
|
+
constructor(glowwService, changeDetectorRef, dialog, router, location, authenticationService, formBuilder, route, i18n) {
|
|
998
1027
|
this.changeDetectorRef = changeDetectorRef;
|
|
999
1028
|
this.dialog = dialog;
|
|
1000
1029
|
this.router = router;
|
|
@@ -1002,7 +1031,7 @@ class DisplayObjectsComponent {
|
|
|
1002
1031
|
this.authenticationService = authenticationService;
|
|
1003
1032
|
this.formBuilder = formBuilder;
|
|
1004
1033
|
this.route = route;
|
|
1005
|
-
this.
|
|
1034
|
+
this.i18n = i18n;
|
|
1006
1035
|
this.canDisplayObj = false;
|
|
1007
1036
|
this.canEdit = true;
|
|
1008
1037
|
this.canDelete = true;
|
|
@@ -1151,6 +1180,9 @@ class DisplayObjectsComponent {
|
|
|
1151
1180
|
ngOnDestroy() {
|
|
1152
1181
|
this.navSubscription?.unsubscribe(); // this prevents a memory leak
|
|
1153
1182
|
}
|
|
1183
|
+
t(key, fallback) {
|
|
1184
|
+
return this.i18n.instant(key, fallback);
|
|
1185
|
+
}
|
|
1154
1186
|
Init(data) {
|
|
1155
1187
|
if ((data && Object.keys(data).length > 0) || this.displayresult) {
|
|
1156
1188
|
this.Search(data);
|
|
@@ -1487,14 +1519,14 @@ class DisplayObjectsComponent {
|
|
|
1487
1519
|
});
|
|
1488
1520
|
}
|
|
1489
1521
|
DeleteObj(obj) {
|
|
1490
|
-
if (confirm(this.
|
|
1522
|
+
if (confirm(this.t('GLOWW.CONFIRM_DELETE', 'Are you sure you want to delete this object ?'))) {
|
|
1491
1523
|
this.deleteRequest.apply(this.glowwService, this.getPrimaryKey(obj)).subscribe(p => {
|
|
1492
1524
|
const i = this.dataSource.data.indexOf(obj);
|
|
1493
1525
|
const tmp = this.dataSource.data;
|
|
1494
1526
|
tmp.splice(i, 1);
|
|
1495
1527
|
this.dataSource.data = tmp;
|
|
1496
1528
|
}, error => {
|
|
1497
|
-
alert(`${this.
|
|
1529
|
+
alert(`${this.t('GLOWW.UNABLE_TO_DELETE_OBJECT', 'Unable to delete object')} ${error.status} ${error.statusText}\n${error.Message}\n${error.error}`);
|
|
1498
1530
|
});
|
|
1499
1531
|
}
|
|
1500
1532
|
}
|
|
@@ -1576,18 +1608,18 @@ class DisplayObjectsComponent {
|
|
|
1576
1608
|
return '';
|
|
1577
1609
|
}
|
|
1578
1610
|
const details = error.error?.message || error.error || error.message || error.statusText || `${error}`;
|
|
1579
|
-
return `${this.
|
|
1611
|
+
return `${this.t('GLOWW.UNABLE_TO_QUERY', 'Unable to query')} : ${details}`;
|
|
1580
1612
|
}
|
|
1581
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DisplayObjectsComponent, deps: [{ token: 'glowwService' }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }, { token: i2.Router }, { token: i3.Location }, { token: AuthenticationService }, { token: i1$3.UntypedFormBuilder }, { token: i2.ActivatedRoute }, { token:
|
|
1582
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DisplayObjectsComponent, isStandalone: true, selector: "glw-display-objects", inputs: { configuration: "configuration", displayObjLink: "displayObjLink", canDisplayObj: "canDisplayObj", canEdit: "canEdit", canDelete: "canDelete", canAdd: "canAdd", form: "form", SearchForm: "SearchForm", searchRequest: "searchRequest", postRequest: "postRequest", deleteRequest: "deleteRequest", putRequest: "putRequest", maxrows: "maxrows", mandatoryParams: "mandatoryParams", actions: "actions", dialogConfig: "dialogConfig", parent: "parent", columns: "columns", objectName: "objectName", primaryKey: "primaryKey", Editor: "Editor", AddEditor: "AddEditor" }, queries: [{ propertyName: "header", first: true, predicate: HeaderComponent, descendants: true }, { propertyName: "searchFormLayout", first: true, predicate: SearchFormComponent, descendants: true }, { propertyName: "filterFormLayout", first: true, predicate: FilterFormComponent, descendants: true }, { propertyName: "resultLayout", first: true, predicate: ResultTableComponent, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div>\n <ng-content select=\"glw-header\"></ng-content>\n</div>\n\n@if (displayform) {\n <div>\n <mat-card appearance=\"outlined\">\n <mat-card-content>\n @if (resultException) {\n <mat-error>\n {{ resultException }}\n </mat-error>\n }\n <ng-content select=\"glw-search-form\"></ng-content>\n <!--<ng-container *ngComponentOutlet=\"SearchForm; injector: objInjector\"></ng-container>-->\n @if (maxrows) {\n <div [formGroup]=\"form2\">\n <br />\n <mat-form-field>\n <mat-select [placeholder]=\"'COMMON.MAX_ROW'
|
|
1613
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DisplayObjectsComponent, deps: [{ token: 'glowwService' }, { token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }, { token: i2.Router }, { token: i3.Location }, { token: AuthenticationService }, { token: i1$3.UntypedFormBuilder }, { token: i2.ActivatedRoute }, { token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1614
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DisplayObjectsComponent, isStandalone: true, selector: "glw-display-objects", inputs: { configuration: "configuration", displayObjLink: "displayObjLink", canDisplayObj: "canDisplayObj", canEdit: "canEdit", canDelete: "canDelete", canAdd: "canAdd", form: "form", SearchForm: "SearchForm", searchRequest: "searchRequest", postRequest: "postRequest", deleteRequest: "deleteRequest", putRequest: "putRequest", maxrows: "maxrows", mandatoryParams: "mandatoryParams", actions: "actions", dialogConfig: "dialogConfig", parent: "parent", columns: "columns", objectName: "objectName", primaryKey: "primaryKey", Editor: "Editor", AddEditor: "AddEditor" }, queries: [{ propertyName: "header", first: true, predicate: HeaderComponent, descendants: true }, { propertyName: "searchFormLayout", first: true, predicate: SearchFormComponent, descendants: true }, { propertyName: "filterFormLayout", first: true, predicate: FilterFormComponent, descendants: true }, { propertyName: "resultLayout", first: true, predicate: ResultTableComponent, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div>\n <ng-content select=\"glw-header\"></ng-content>\n</div>\n\n@if (displayform) {\n <div>\n <mat-card appearance=\"outlined\">\n <mat-card-content>\n @if (resultException) {\n <mat-error>\n {{ resultException }}\n </mat-error>\n }\n <ng-content select=\"glw-search-form\"></ng-content>\n <!--<ng-container *ngComponentOutlet=\"SearchForm; injector: objInjector\"></ng-container>-->\n @if (maxrows) {\n <div [formGroup]=\"form2\">\n <br />\n <mat-form-field>\n <mat-select [placeholder]=\"t('COMMON.MAX_ROW', 'MaxRow')\" formControlName=\"_MaxRow_\">\n @for (maxrow of maxrows; track maxrow) {\n <mat-option [value]=\"maxrow\">\n @if (maxrow) {\n <span>{{maxrow}} {{ t('COMMON.OBJECTS_SUFFIX', 'objects') }}</span>\n }\n @if (!maxrow) {\n <span>{{ t('COMMON.DEFAULT', 'Default') }}</span>\n }\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n }\n </mat-card-content>\n <mat-card-actions>\n <button mat-stroked-button color=\"accent\" (click)=\"onSearch()\">\n <mat-icon>search</mat-icon>\n {{ t('COMMON.SEARCH', 'Search') }}\n </button>\n </mat-card-actions>\n </mat-card>\n </div>\n}\n\n<div [hidden]=\"!displayresult\">\n <!--*ngIf=\"displayresult\"-->\n <div class=\"mat-elevation-z8\" [hidden]=\"!dataSource\">\n <ng-content select=\"[filter]\"></ng-content>\n\n <!--*ngIf=\"dataSource; else Spinner\"-->\n <table mat-table [dataSource]=\"dataSource\" matSort>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef>\n @if (canAddThis()) {\n <i class=\"fal fa-plus\" (click)=\"AddObj()\">\n </i>\n }\n </th>\n <td mat-cell *matCellDef=\"let obj\">\n @if (canDisplayObjThis(obj)) {\n <i class=\"fal fa-eye\" [routerLink]=\"displayObjLinkThis(obj)\">\n </i>\n }\n @for (action of actions; track action) {\n @if (action.icon.icon && (!action.display || action.display(obj, action.name))) {\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\">\n </i>\n }\n @if (!action.icon.icon && (!action.display || action.display(obj, action.name))) {\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\"></i>\n }\n }\n @if (canDeleteThis(obj)) {\n <i class=\"fal fa-trash-alt\" (click)=\"DeleteObj(obj)\">\n </i>\n }\n @if (canEditThis(obj)) {\n <i class=\"fal fa-pencil\" (click)=\"EditObj(obj)\">\n </i>\n }\n </td>\n </ng-container>\n <ng-content select=\"glw-result-table\"></ng-content>\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\n </table>\n <mat-paginator [pageSize]=\"10\" [pageSizeOptions]=\"[10, 20, 50, 100]\" [showFirstLastButtons]=\"true\"></mat-paginator>\n </div>\n <div #Spinner [hidden]=\"dataSource\">\n <mat-spinner></mat-spinner>\n </div>\n</div>\n", styles: ["table{width:100%}i{cursor:pointer;padding:5px}\n"], dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: MatCardContent, selector: "mat-card-content" }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "directive", type: MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatDialogModule }] }); }
|
|
1583
1615
|
}
|
|
1584
1616
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DisplayObjectsComponent, decorators: [{
|
|
1585
1617
|
type: Component,
|
|
1586
|
-
args: [{ selector: 'glw-display-objects', imports: [MatCard, MatCardContent, MatError, FormsModule, ReactiveFormsModule, MatFormField, MatSelect, MatOption, MatCardActions, MatButton, MatIcon, MatTable, MatSort, MatColumnDef, MatHeaderCellDef, MatHeaderCell, MatCellDef, MatCell, RouterLink, NgClass, MatHeaderRowDef, MatHeaderRow, MatRowDef, MatRow, MatPaginator, MatProgressSpinner, MatDialogModule
|
|
1618
|
+
args: [{ selector: 'glw-display-objects', imports: [MatCard, MatCardContent, MatError, FormsModule, ReactiveFormsModule, MatFormField, MatSelect, MatOption, MatCardActions, MatButton, MatIcon, MatTable, MatSort, MatColumnDef, MatHeaderCellDef, MatHeaderCell, MatCellDef, MatCell, RouterLink, NgClass, MatHeaderRowDef, MatHeaderRow, MatRowDef, MatRow, MatPaginator, MatProgressSpinner, MatDialogModule], template: "<div>\n <ng-content select=\"glw-header\"></ng-content>\n</div>\n\n@if (displayform) {\n <div>\n <mat-card appearance=\"outlined\">\n <mat-card-content>\n @if (resultException) {\n <mat-error>\n {{ resultException }}\n </mat-error>\n }\n <ng-content select=\"glw-search-form\"></ng-content>\n <!--<ng-container *ngComponentOutlet=\"SearchForm; injector: objInjector\"></ng-container>-->\n @if (maxrows) {\n <div [formGroup]=\"form2\">\n <br />\n <mat-form-field>\n <mat-select [placeholder]=\"t('COMMON.MAX_ROW', 'MaxRow')\" formControlName=\"_MaxRow_\">\n @for (maxrow of maxrows; track maxrow) {\n <mat-option [value]=\"maxrow\">\n @if (maxrow) {\n <span>{{maxrow}} {{ t('COMMON.OBJECTS_SUFFIX', 'objects') }}</span>\n }\n @if (!maxrow) {\n <span>{{ t('COMMON.DEFAULT', 'Default') }}</span>\n }\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n </div>\n }\n </mat-card-content>\n <mat-card-actions>\n <button mat-stroked-button color=\"accent\" (click)=\"onSearch()\">\n <mat-icon>search</mat-icon>\n {{ t('COMMON.SEARCH', 'Search') }}\n </button>\n </mat-card-actions>\n </mat-card>\n </div>\n}\n\n<div [hidden]=\"!displayresult\">\n <!--*ngIf=\"displayresult\"-->\n <div class=\"mat-elevation-z8\" [hidden]=\"!dataSource\">\n <ng-content select=\"[filter]\"></ng-content>\n\n <!--*ngIf=\"dataSource; else Spinner\"-->\n <table mat-table [dataSource]=\"dataSource\" matSort>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef>\n @if (canAddThis()) {\n <i class=\"fal fa-plus\" (click)=\"AddObj()\">\n </i>\n }\n </th>\n <td mat-cell *matCellDef=\"let obj\">\n @if (canDisplayObjThis(obj)) {\n <i class=\"fal fa-eye\" [routerLink]=\"displayObjLinkThis(obj)\">\n </i>\n }\n @for (action of actions; track action) {\n @if (action.icon.icon && (!action.display || action.display(obj, action.name))) {\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\">\n </i>\n }\n @if (!action.icon.icon && (!action.display || action.display(obj, action.name))) {\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\"></i>\n }\n }\n @if (canDeleteThis(obj)) {\n <i class=\"fal fa-trash-alt\" (click)=\"DeleteObj(obj)\">\n </i>\n }\n @if (canEditThis(obj)) {\n <i class=\"fal fa-pencil\" (click)=\"EditObj(obj)\">\n </i>\n }\n </td>\n </ng-container>\n <ng-content select=\"glw-result-table\"></ng-content>\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\n </table>\n <mat-paginator [pageSize]=\"10\" [pageSizeOptions]=\"[10, 20, 50, 100]\" [showFirstLastButtons]=\"true\"></mat-paginator>\n </div>\n <div #Spinner [hidden]=\"dataSource\">\n <mat-spinner></mat-spinner>\n </div>\n</div>\n", styles: ["table{width:100%}i{cursor:pointer;padding:5px}\n"] }]
|
|
1587
1619
|
}], ctorParameters: () => [{ type: GlowwService, decorators: [{
|
|
1588
1620
|
type: Inject,
|
|
1589
1621
|
args: ['glowwService']
|
|
1590
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }, { type: i2.Router }, { type: i3.Location }, { type: AuthenticationService }, { type: i1$3.UntypedFormBuilder }, { type: i2.ActivatedRoute }, { type:
|
|
1622
|
+
}] }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }, { type: i2.Router }, { type: i3.Location }, { type: AuthenticationService }, { type: i1$3.UntypedFormBuilder }, { type: i2.ActivatedRoute }, { type: GlowwI18nService }], propDecorators: { header: [{
|
|
1591
1623
|
type: ContentChild,
|
|
1592
1624
|
args: [HeaderComponent]
|
|
1593
1625
|
}], searchFormLayout: [{
|
|
@@ -1744,9 +1776,10 @@ class MenuListItemComponent {
|
|
|
1744
1776
|
console.log("change expanded");
|
|
1745
1777
|
this._expanded = value;
|
|
1746
1778
|
}
|
|
1747
|
-
constructor(glowwService, navService, router) {
|
|
1779
|
+
constructor(glowwService, navService, router, i18n) {
|
|
1748
1780
|
this.navService = navService;
|
|
1749
1781
|
this.router = router;
|
|
1782
|
+
this.i18n = i18n;
|
|
1750
1783
|
this._expanded = false;
|
|
1751
1784
|
this.ariaExpanded = this.expanded;
|
|
1752
1785
|
this.falsePromise = new Promise((resolve, reject) => {
|
|
@@ -1790,6 +1823,9 @@ class MenuListItemComponent {
|
|
|
1790
1823
|
}
|
|
1791
1824
|
return route;
|
|
1792
1825
|
}
|
|
1826
|
+
displayName(item) {
|
|
1827
|
+
return this.i18n.instant(item.displayName, item.displayName);
|
|
1828
|
+
}
|
|
1793
1829
|
getDisabledPromise() {
|
|
1794
1830
|
//console.log(`isdisable item ${item.displayName} ${item.disabled}`);
|
|
1795
1831
|
if (!this.item.disabled) {
|
|
@@ -1803,8 +1839,8 @@ class MenuListItemComponent {
|
|
|
1803
1839
|
}
|
|
1804
1840
|
return this.item.hidden();
|
|
1805
1841
|
}
|
|
1806
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MenuListItemComponent, deps: [{ token: 'glowwService' }, { token: NavService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1807
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: MenuListItemComponent, isStandalone: true, selector: "gloww-menu-list-item", inputs: { item: "item", depth: "depth" }, host: { properties: { "attr.aria-expanded": "this.ariaExpanded" } }, ngImport: i0, template: "@if (item) {\n @if (!(_hidden | async)) {\n <div class=\"thisMenu\" (click)=\"onItemSelected(item)\" [class.disabled]=\"(_disabled | async)\">\n <a mat-list-item lines=\"1\"\n [ngStyle]=\"{'padding-left': (depth * 12) + 'px'}\"\n [ngClass]=\"{'active': isActive(item) && !(_disabled | async), 'expanded': expanded}\"\n class=\"menu-list-item\"\n [routerLink]=\"routerLink(item)\">\n <span matListItemIcon class=\"routeIcon\">\n <i [ngClass]=\"item.icon\" [ngStyle]=\"item.iconStyle\"></i>\n </span>\n <span matListItemTitle class=\"menu-label\">{{ item
|
|
1842
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MenuListItemComponent, deps: [{ token: 'glowwService' }, { token: NavService }, { token: i2.Router }, { token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1843
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: MenuListItemComponent, isStandalone: true, selector: "gloww-menu-list-item", inputs: { item: "item", depth: "depth" }, host: { properties: { "attr.aria-expanded": "this.ariaExpanded" } }, ngImport: i0, template: "@if (item) {\n @if (!(_hidden | async)) {\n <div class=\"thisMenu\" (click)=\"onItemSelected(item)\" [class.disabled]=\"(_disabled | async)\">\n <a mat-list-item lines=\"1\"\n [ngStyle]=\"{'padding-left': (depth * 12) + 'px'}\"\n [ngClass]=\"{'active': isActive(item) && !(_disabled | async), 'expanded': expanded}\"\n class=\"menu-list-item\"\n [routerLink]=\"routerLink(item)\">\n <span matListItemIcon class=\"routeIcon\">\n <i [ngClass]=\"item.icon\" [ngStyle]=\"item.iconStyle\"></i>\n </span>\n <span matListItemTitle class=\"menu-label\">{{ displayName(item) }}</span>\n </a>\n @if (item.children?.length && !(_disabled | async)) {\n <div class=\"expand-container\">\n <mat-icon [@indicatorRotate]=\"expanded ? 'expanded': 'collapsed'\" class=\"expandIcon\">\n expand_more\n </mat-icon>\n </div>\n }\n </div>\n }\n @if (expanded && !(_disabled | async)) {\n <div>\n @for (child of item.children; track child) {\n <gloww-menu-list-item [item]=\"child\" [depth]=\"depth+1\">\n </gloww-menu-list-item>\n }\n </div>\n }\n}\n", styles: [".thisMenu{display:flex;flex-direction:row;align-items:center;outline:none;width:calc(100% - 20px);margin:10px;cursor:pointer}.menu-list-item{display:flex;align-items:center;flex:1;padding:8px 0;text-decoration:none;color:inherit;min-width:0}.menu-list-item .menu-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.expand-container{display:flex;align-items:center;justify-content:center;flex-shrink:0}.routeIcon{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:32px;margin-right:20px;flex-shrink:0;overflow:visible}.routeIcon i{display:inline-block;line-height:1}mat-icon{height:32px;width:40px;display:flex;align-items:center;justify-content:center}.expandIcon{cursor:pointer}:disabled,.disabled{color:#d3d3d3!important;pointer-events:none}:disabled .routeIcon i,:disabled mat-icon i,.disabled .routeIcon i,.disabled mat-icon i{color:#d3d3d3!important}\n"], dependencies: [{ kind: "component", type: MenuListItemComponent, selector: "gloww-menu-list-item", inputs: ["item", "depth"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [
|
|
1808
1844
|
trigger('indicatorRotate', [
|
|
1809
1845
|
state('collapsed', style({ transform: 'rotate(0deg)' })),
|
|
1810
1846
|
state('expanded', style({ transform: 'rotate(180deg)' })),
|
|
@@ -1820,11 +1856,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
1820
1856
|
state('expanded', style({ transform: 'rotate(180deg)' })),
|
|
1821
1857
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)'))
|
|
1822
1858
|
])
|
|
1823
|
-
], imports: [NgStyle, NgClass, RouterLink, MatIcon, MatListItem, MatListItemIcon, MatListItemTitle, AsyncPipe
|
|
1859
|
+
], imports: [NgStyle, NgClass, RouterLink, MatIcon, MatListItem, MatListItemIcon, MatListItemTitle, AsyncPipe], template: "@if (item) {\n @if (!(_hidden | async)) {\n <div class=\"thisMenu\" (click)=\"onItemSelected(item)\" [class.disabled]=\"(_disabled | async)\">\n <a mat-list-item lines=\"1\"\n [ngStyle]=\"{'padding-left': (depth * 12) + 'px'}\"\n [ngClass]=\"{'active': isActive(item) && !(_disabled | async), 'expanded': expanded}\"\n class=\"menu-list-item\"\n [routerLink]=\"routerLink(item)\">\n <span matListItemIcon class=\"routeIcon\">\n <i [ngClass]=\"item.icon\" [ngStyle]=\"item.iconStyle\"></i>\n </span>\n <span matListItemTitle class=\"menu-label\">{{ displayName(item) }}</span>\n </a>\n @if (item.children?.length && !(_disabled | async)) {\n <div class=\"expand-container\">\n <mat-icon [@indicatorRotate]=\"expanded ? 'expanded': 'collapsed'\" class=\"expandIcon\">\n expand_more\n </mat-icon>\n </div>\n }\n </div>\n }\n @if (expanded && !(_disabled | async)) {\n <div>\n @for (child of item.children; track child) {\n <gloww-menu-list-item [item]=\"child\" [depth]=\"depth+1\">\n </gloww-menu-list-item>\n }\n </div>\n }\n}\n", styles: [".thisMenu{display:flex;flex-direction:row;align-items:center;outline:none;width:calc(100% - 20px);margin:10px;cursor:pointer}.menu-list-item{display:flex;align-items:center;flex:1;padding:8px 0;text-decoration:none;color:inherit;min-width:0}.menu-list-item .menu-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.expand-container{display:flex;align-items:center;justify-content:center;flex-shrink:0}.routeIcon{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:32px;margin-right:20px;flex-shrink:0;overflow:visible}.routeIcon i{display:inline-block;line-height:1}mat-icon{height:32px;width:40px;display:flex;align-items:center;justify-content:center}.expandIcon{cursor:pointer}:disabled,.disabled{color:#d3d3d3!important;pointer-events:none}:disabled .routeIcon i,:disabled mat-icon i,.disabled .routeIcon i,.disabled mat-icon i{color:#d3d3d3!important}\n"] }]
|
|
1824
1860
|
}], ctorParameters: () => [{ type: GlowwService, decorators: [{
|
|
1825
1861
|
type: Inject,
|
|
1826
1862
|
args: ['glowwService']
|
|
1827
|
-
}] }, { type: NavService }, { type: i2.Router }], propDecorators: { ariaExpanded: [{
|
|
1863
|
+
}] }, { type: NavService }, { type: i2.Router }, { type: GlowwI18nService }], propDecorators: { ariaExpanded: [{
|
|
1828
1864
|
type: HostBinding,
|
|
1829
1865
|
args: ['attr.aria-expanded']
|
|
1830
1866
|
}], item: [{
|
|
@@ -3564,7 +3600,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3564
3600
|
}] } });
|
|
3565
3601
|
|
|
3566
3602
|
class DatetimeComponent {
|
|
3567
|
-
constructor() {
|
|
3603
|
+
constructor(locale) {
|
|
3604
|
+
this.locale = locale;
|
|
3568
3605
|
this._value = null;
|
|
3569
3606
|
this.display = null;
|
|
3570
3607
|
this.placeHolder = null;
|
|
@@ -3596,6 +3633,18 @@ class DatetimeComponent {
|
|
|
3596
3633
|
setDisabledState(isDisabled) {
|
|
3597
3634
|
//throw new Error('Method not implemented.');
|
|
3598
3635
|
}
|
|
3636
|
+
get resolvedCancelLabel() {
|
|
3637
|
+
if (this.cancelLabel) {
|
|
3638
|
+
return this.cancelLabel;
|
|
3639
|
+
}
|
|
3640
|
+
return this.isFrenchLocale ? 'Annuler' : 'Cancel';
|
|
3641
|
+
}
|
|
3642
|
+
get resolvedApplyLabel() {
|
|
3643
|
+
if (this.applyLabel) {
|
|
3644
|
+
return this.applyLabel;
|
|
3645
|
+
}
|
|
3646
|
+
return 'OK';
|
|
3647
|
+
}
|
|
3599
3648
|
normalizeDateValue(value) {
|
|
3600
3649
|
if (value === undefined || value === null || value === '') {
|
|
3601
3650
|
return null;
|
|
@@ -3617,14 +3666,17 @@ class DatetimeComponent {
|
|
|
3617
3666
|
}
|
|
3618
3667
|
return null;
|
|
3619
3668
|
}
|
|
3620
|
-
|
|
3621
|
-
|
|
3669
|
+
get isFrenchLocale() {
|
|
3670
|
+
return (this.locale ?? '').toLowerCase().startsWith('fr');
|
|
3671
|
+
}
|
|
3672
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatetimeComponent, deps: [{ token: MAT_DATE_LOCALE, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3673
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: DatetimeComponent, isStandalone: true, selector: "gloww-datetime", inputs: { _value: ["value", "_value"], display: "display", placeHolder: "placeHolder", mode: "mode", showSpinners: "showSpinners", showSeconds: "showSeconds", disableMinute: "disableMinute", touchUi: "touchUi", cancelLabel: "cancelLabel", applyLabel: "applyLabel" }, providers: [
|
|
3622
3674
|
{
|
|
3623
3675
|
provide: NG_VALUE_ACCESSOR,
|
|
3624
3676
|
multi: true,
|
|
3625
3677
|
useExisting: DatetimeComponent
|
|
3626
3678
|
}
|
|
3627
|
-
], ngImport: i0, template: "<div style=\"width:100%\">\n @if (mode==='date') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n }\n\n @if (mode==='datetime') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [ngxMatDatetimePicker]=\"pickerDT\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"$any(pickerDT)\"></mat-datepicker-toggle>\n <ngx-mat-datetime-picker #pickerDT [showSpinners]=\"showSpinners\" [showSeconds]=\"showSeconds\" [touchUi]=\"touchUi\" [disableMinute]=\"disableMinute\">\n </ngx-mat-datetime-picker>\n </mat-form-field>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type:
|
|
3679
|
+
], ngImport: i0, template: "<div style=\"width:100%\">\n @if (mode==='date') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n }\n\n @if (mode==='datetime') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [ngxMatDatetimePicker]=\"pickerDT\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"$any(pickerDT)\"></mat-datepicker-toggle>\n <ngx-mat-datetime-picker #pickerDT [showSpinners]=\"showSpinners\" [showSeconds]=\"showSeconds\" [touchUi]=\"touchUi\" [disableMinute]=\"disableMinute\">\n <ngx-mat-datepicker-actions>\n <button mat-button ngxMatDatepickerCancel>{{ resolvedCancelLabel }}</button>\n <button mat-raised-button color=\"primary\" ngxMatDatepickerApply>{{ resolvedApplyLabel }}</button>\n </ngx-mat-datepicker-actions>\n </ngx-mat-datetime-picker>\n </mat-form-field>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: NgxMatDatetimePickerModule }, { kind: "component", type: i3$1.NgxMatDatetimepicker, selector: "ngx-mat-datetime-picker", exportAs: ["ngxMatDatetimePicker"] }, { kind: "directive", type: i3$1.NgxMatDatepickerInput, selector: "input[ngxMatDatetimePicker]", inputs: ["ngxMatDatetimePicker", "min", "max", "matDatepickerFilter"], exportAs: ["ngxMatDatepickerInput"] }, { kind: "component", type: i3$1.NgxMatDatepickerActions, selector: "ngx-mat-datepicker-actions, ngx-mat-date-range-picker-actions" }, { kind: "directive", type: i3$1.NgxMatDatepickerCancel, selector: "[ngxMatDatepickerCancel], [ngxMatDateRangePickerCancel]" }, { kind: "directive", type: i3$1.NgxMatDatepickerApply, selector: "[ngxMatDatepickerApply], [ngxMatDateRangePickerApply]" }, { kind: "ngmodule", type: NgxMatNativeDateModule }] }); }
|
|
3628
3680
|
}
|
|
3629
3681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatetimeComponent, decorators: [{
|
|
3630
3682
|
type: Component,
|
|
@@ -3634,8 +3686,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3634
3686
|
multi: true,
|
|
3635
3687
|
useExisting: DatetimeComponent
|
|
3636
3688
|
}
|
|
3637
|
-
], imports: [MatFormField, MatLabel, MatInput, MatDatepickerInput, FormsModule, MatDatepickerToggle, MatSuffix, MatDatepicker, NgxMatDatetimePickerModule, NgxMatNativeDateModule], template: "<div style=\"width:100%\">\n @if (mode==='date') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n }\n\n @if (mode==='datetime') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [ngxMatDatetimePicker]=\"pickerDT\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"$any(pickerDT)\"></mat-datepicker-toggle>\n <ngx-mat-datetime-picker #pickerDT [showSpinners]=\"showSpinners\" [showSeconds]=\"showSeconds\" [touchUi]=\"touchUi\" [disableMinute]=\"disableMinute\">\n </ngx-mat-datetime-picker>\n </mat-form-field>\n }\n</div>\n" }]
|
|
3638
|
-
}], ctorParameters: () => [
|
|
3689
|
+
], imports: [MatFormField, MatLabel, MatInput, MatDatepickerInput, FormsModule, MatDatepickerToggle, MatSuffix, MatDatepicker, MatButtonModule, NgxMatDatetimePickerModule, NgxMatNativeDateModule], template: "<div style=\"width:100%\">\n @if (mode==='date') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n }\n\n @if (mode==='datetime') {\n <mat-form-field>\n <mat-label>{{display}}</mat-label>\n <input matInput [ngxMatDatetimePicker]=\"pickerDT\" [placeholder]=\"placeHolder\" [(ngModel)]=\"value\">\n <mat-datepicker-toggle matSuffix [for]=\"$any(pickerDT)\"></mat-datepicker-toggle>\n <ngx-mat-datetime-picker #pickerDT [showSpinners]=\"showSpinners\" [showSeconds]=\"showSeconds\" [touchUi]=\"touchUi\" [disableMinute]=\"disableMinute\">\n <ngx-mat-datepicker-actions>\n <button mat-button ngxMatDatepickerCancel>{{ resolvedCancelLabel }}</button>\n <button mat-raised-button color=\"primary\" ngxMatDatepickerApply>{{ resolvedApplyLabel }}</button>\n </ngx-mat-datepicker-actions>\n </ngx-mat-datetime-picker>\n </mat-form-field>\n }\n</div>\n" }]
|
|
3690
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3691
|
+
type: Optional
|
|
3692
|
+
}, {
|
|
3693
|
+
type: Inject,
|
|
3694
|
+
args: [MAT_DATE_LOCALE]
|
|
3695
|
+
}] }], propDecorators: { _value: [{
|
|
3639
3696
|
type: Input,
|
|
3640
3697
|
args: ['value']
|
|
3641
3698
|
}], display: [{
|
|
@@ -3655,6 +3712,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3655
3712
|
type: Input
|
|
3656
3713
|
}], touchUi: [{
|
|
3657
3714
|
type: Input
|
|
3715
|
+
}], cancelLabel: [{
|
|
3716
|
+
type: Input
|
|
3717
|
+
}], applyLabel: [{
|
|
3718
|
+
type: Input
|
|
3658
3719
|
}] } });
|
|
3659
3720
|
|
|
3660
3721
|
class CallbackDirective {
|
|
@@ -3671,37 +3732,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3671
3732
|
}], ctorParameters: () => [] });
|
|
3672
3733
|
|
|
3673
3734
|
class GlowwMatPaginatorIntlService extends MatPaginatorIntl {
|
|
3674
|
-
constructor(
|
|
3735
|
+
constructor(i18n) {
|
|
3675
3736
|
super();
|
|
3676
|
-
this.
|
|
3737
|
+
this.i18n = i18n;
|
|
3677
3738
|
this.getRangeLabel = (page, pageSize, length) => {
|
|
3678
3739
|
if (length === 0 || pageSize === 0) {
|
|
3679
|
-
return `0 ${this.
|
|
3740
|
+
return `0 ${this.i18n.instant('PAGINATOR.OF', 'of')} ${length}`;
|
|
3680
3741
|
}
|
|
3681
3742
|
const startIndex = page * pageSize;
|
|
3682
3743
|
const endIndex = Math.min(startIndex + pageSize, length);
|
|
3683
|
-
return `${startIndex + 1}-${endIndex} ${this.
|
|
3744
|
+
return `${startIndex + 1}-${endIndex} ${this.i18n.instant('PAGINATOR.OF', 'of')} ${length}`;
|
|
3684
3745
|
};
|
|
3685
|
-
this.subscription = this.
|
|
3746
|
+
this.subscription = this.i18n.langChanges$.subscribe(() => this.translateLabels());
|
|
3686
3747
|
this.translateLabels();
|
|
3687
3748
|
}
|
|
3688
3749
|
ngOnDestroy() {
|
|
3689
3750
|
this.subscription.unsubscribe();
|
|
3690
3751
|
}
|
|
3691
3752
|
translateLabels() {
|
|
3692
|
-
this.itemsPerPageLabel = this.
|
|
3693
|
-
this.nextPageLabel = this.
|
|
3694
|
-
this.previousPageLabel = this.
|
|
3695
|
-
this.firstPageLabel = this.
|
|
3696
|
-
this.lastPageLabel = this.
|
|
3753
|
+
this.itemsPerPageLabel = this.i18n.instant('PAGINATOR.ITEMS_PER_PAGE', 'Items per page');
|
|
3754
|
+
this.nextPageLabel = this.i18n.instant('PAGINATOR.NEXT_PAGE', 'Next page');
|
|
3755
|
+
this.previousPageLabel = this.i18n.instant('PAGINATOR.PREVIOUS_PAGE', 'Previous page');
|
|
3756
|
+
this.firstPageLabel = this.i18n.instant('PAGINATOR.FIRST_PAGE', 'First page');
|
|
3757
|
+
this.lastPageLabel = this.i18n.instant('PAGINATOR.LAST_PAGE', 'Last page');
|
|
3697
3758
|
this.changes.next();
|
|
3698
3759
|
}
|
|
3699
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService, deps: [{ token:
|
|
3760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService, deps: [{ token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3700
3761
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService }); }
|
|
3701
3762
|
}
|
|
3702
3763
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService, decorators: [{
|
|
3703
3764
|
type: Injectable
|
|
3704
|
-
}], ctorParameters: () => [{ type:
|
|
3765
|
+
}], ctorParameters: () => [{ type: GlowwI18nService }] });
|
|
3705
3766
|
|
|
3706
3767
|
class BaseCollectionComponent {
|
|
3707
3768
|
constructor(_formBuilder) {
|
|
@@ -3829,8 +3890,7 @@ class GlowwModule {
|
|
|
3829
3890
|
NgxMatNativeDateModule, // Existe selon ta liste
|
|
3830
3891
|
//NgxMatMomentModule,
|
|
3831
3892
|
DragDropModule,
|
|
3832
|
-
AngularResizeEventModule,
|
|
3833
|
-
TranslateModule, UploadDocComponent,
|
|
3893
|
+
AngularResizeEventModule, UploadDocComponent,
|
|
3834
3894
|
SafeHtmlPipe,
|
|
3835
3895
|
DisplayObjectsComponent,
|
|
3836
3896
|
HeaderComponent,
|
|
@@ -3911,8 +3971,7 @@ class GlowwModule {
|
|
|
3911
3971
|
NgxMatNativeDateModule, // Existe selon ta liste
|
|
3912
3972
|
//NgxMatMomentModule,
|
|
3913
3973
|
DragDropModule,
|
|
3914
|
-
AngularResizeEventModule,
|
|
3915
|
-
TranslateModule, UploadDocComponent,
|
|
3974
|
+
AngularResizeEventModule, UploadDocComponent,
|
|
3916
3975
|
DisplayObjectsComponent,
|
|
3917
3976
|
ConfirmationComponent,
|
|
3918
3977
|
PromptComponent,
|
|
@@ -3960,7 +4019,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3960
4019
|
//NgxMatMomentModule,
|
|
3961
4020
|
DragDropModule,
|
|
3962
4021
|
AngularResizeEventModule,
|
|
3963
|
-
TranslateModule,
|
|
3964
4022
|
...GLOWW_STANDALONE_DECLARATIONS
|
|
3965
4023
|
],
|
|
3966
4024
|
providers: [{ provide: MatPaginatorIntl, useClass: GlowwMatPaginatorIntlService }],
|