@gloww/gloww 20.0.0-beta.4 → 20.0.0-beta.40
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 +608 -183
- package/fesm2022/gloww-gloww.mjs.map +1 -1
- package/gloww.theme.scss +190 -0
- package/index.d.ts +161 -62
- package/package.json +31 -16
- package/src/lib/gloww.theme.scss +0 -45
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';
|
|
@@ -12,12 +12,11 @@ import * as i2 from '@angular/router';
|
|
|
12
12
|
import { NavigationEnd, RouterLink, RouterModule } from '@angular/router';
|
|
13
13
|
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
14
14
|
import * as i1$1 from '@angular/platform-browser';
|
|
15
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
16
15
|
import * as i5 from '@kolkov/angular-editor';
|
|
17
16
|
import { AngularEditorModule } from '@kolkov/angular-editor';
|
|
18
17
|
import { switchMap, map, tap, filter, catchError, take, mergeMap, retryWhen, scan, delay, first, distinctUntilChanged, debounceTime } from 'rxjs/operators';
|
|
19
18
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
20
|
-
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
19
|
+
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
21
20
|
import { MatColumnDef, MatTableDataSource, MatTable, MatHeaderCellDef, MatHeaderCell, MatCellDef, MatCell, MatHeaderRowDef, MatHeaderRow, MatRowDef, MatRow, MatTableModule } from '@angular/material/table';
|
|
22
21
|
import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
23
22
|
import { MatCard, MatCardContent, MatCardActions, MatCardHeader, MatCardTitle, MatCardModule } from '@angular/material/card';
|
|
@@ -26,27 +25,27 @@ import { MatError, MatFormField, MatInput, MatLabel, MatInputModule, MatSuffix }
|
|
|
26
25
|
import * as i4 from '@ctrl/ngx-codemirror';
|
|
27
26
|
import { CodemirrorModule, CodemirrorComponent } from '@ctrl/ngx-codemirror';
|
|
28
27
|
import * as i1$3 from '@angular/forms';
|
|
29
|
-
import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
28
|
+
import { NG_VALUE_ACCESSOR, FormsModule, UntypedFormControl, ReactiveFormsModule, Validators, FormControl } from '@angular/forms';
|
|
30
29
|
import { MatProgressBar, MatProgressBarModule } from '@angular/material/progress-bar';
|
|
31
30
|
import { MatDatepickerInput, MatDatepickerToggle, MatDatepicker, MatDatepickerModule } from '@angular/material/datepicker';
|
|
32
|
-
import * as i2$1 from 'ngx-mat-datetime-picker-v2';
|
|
33
31
|
import { NgxMatDatetimePickerModule, NgxMatTimepickerComponent, NgxMatNativeDateModule } from 'ngx-mat-datetime-picker-v2';
|
|
32
|
+
import moment from 'moment';
|
|
33
|
+
import * as i1$4 from '@ngx-translate/core';
|
|
34
|
+
import { TranslateDefaultParser } from '@ngx-translate/core';
|
|
34
35
|
import { MatSelect, MatOption, MatSelectModule } from '@angular/material/select';
|
|
35
36
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
37
|
+
import { MatListItem, MatListItemIcon, MatListItemTitle } from '@angular/material/list';
|
|
38
|
+
import * as prettier from 'prettier/standalone';
|
|
39
|
+
import * as parserTypescript from 'prettier/plugins/typescript';
|
|
40
|
+
import * as parserBabel from 'prettier/plugins/babel';
|
|
40
41
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
41
42
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
42
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
43
|
+
import { MatFormFieldModule, MatFormField as MatFormField$1, MatLabel as MatLabel$1 } from '@angular/material/form-field';
|
|
43
44
|
import { jwtDecode } from 'jwt-decode';
|
|
44
45
|
import { CdkDrag, CdkDragHandle, DragDropModule } from '@angular/cdk/drag-drop';
|
|
45
46
|
import FileSaver from 'file-saver';
|
|
46
47
|
import JSZip from 'jszip';
|
|
47
|
-
import { TranslateDefaultParser } from '@ngx-translate/core';
|
|
48
48
|
import { MatAutocompleteTrigger, MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
49
|
-
import moment from 'moment';
|
|
50
49
|
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
|
51
50
|
import { AngularResizeEventModule } from 'angular-resize-event';
|
|
52
51
|
|
|
@@ -223,7 +222,10 @@ class RouteDirective {
|
|
|
223
222
|
}
|
|
224
223
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: RouteDirective, decorators: [{
|
|
225
224
|
type: Directive,
|
|
226
|
-
args: [{
|
|
225
|
+
args: [{
|
|
226
|
+
selector: '[glowwRoute]',
|
|
227
|
+
standalone: true
|
|
228
|
+
}]
|
|
227
229
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i2.Router }], propDecorators: { dlg: [{
|
|
228
230
|
type: Input
|
|
229
231
|
}], onClick: [{
|
|
@@ -245,7 +247,10 @@ class SafeHtmlPipe {
|
|
|
245
247
|
}
|
|
246
248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
247
249
|
type: Pipe,
|
|
248
|
-
args: [{
|
|
250
|
+
args: [{
|
|
251
|
+
name: 'safeHtml',
|
|
252
|
+
standalone: true
|
|
253
|
+
}]
|
|
249
254
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
|
250
255
|
|
|
251
256
|
class ConfirmationComponent {
|
|
@@ -455,7 +460,10 @@ class FileSinkDirective {
|
|
|
455
460
|
}
|
|
456
461
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FileSinkDirective, decorators: [{
|
|
457
462
|
type: Directive,
|
|
458
|
-
args: [{
|
|
463
|
+
args: [{
|
|
464
|
+
selector: '[glowwFileSink]',
|
|
465
|
+
standalone: true
|
|
466
|
+
}]
|
|
459
467
|
}], propDecorators: { fileOver: [{
|
|
460
468
|
type: HostBinding,
|
|
461
469
|
args: ['class.fileover']
|
|
@@ -739,8 +747,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
739
747
|
args: [MatColumnDef]
|
|
740
748
|
}] } });
|
|
741
749
|
|
|
750
|
+
class GlowwI18nService {
|
|
751
|
+
constructor(translate) {
|
|
752
|
+
this.translate = translate;
|
|
753
|
+
}
|
|
754
|
+
get langChanges$() {
|
|
755
|
+
return this.translate?.onLangChange ?? of(null);
|
|
756
|
+
}
|
|
757
|
+
instant(key, fallback) {
|
|
758
|
+
if (!this.translate) {
|
|
759
|
+
return fallback;
|
|
760
|
+
}
|
|
761
|
+
const translated = this.translate.instant(key);
|
|
762
|
+
return translated && translated !== key ? translated : fallback;
|
|
763
|
+
}
|
|
764
|
+
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 }); }
|
|
765
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwI18nService, providedIn: 'root' }); }
|
|
766
|
+
}
|
|
767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwI18nService, decorators: [{
|
|
768
|
+
type: Injectable,
|
|
769
|
+
args: [{ providedIn: 'root' }]
|
|
770
|
+
}], ctorParameters: () => [{ type: i1$4.TranslateService, decorators: [{
|
|
771
|
+
type: Optional
|
|
772
|
+
}] }] });
|
|
773
|
+
|
|
742
774
|
class FilterFormComponent {
|
|
743
|
-
constructor() {
|
|
775
|
+
constructor(i18n) {
|
|
776
|
+
this.i18n = i18n;
|
|
744
777
|
this.filter = new EventEmitter();
|
|
745
778
|
}
|
|
746
779
|
ngOnInit() {
|
|
@@ -748,13 +781,16 @@ class FilterFormComponent {
|
|
|
748
781
|
onFilter() {
|
|
749
782
|
this.filter.emit("xxx");
|
|
750
783
|
}
|
|
751
|
-
|
|
752
|
-
|
|
784
|
+
get filterLabel() {
|
|
785
|
+
return this.i18n.instant('COMMON.FILTER', 'Filter');
|
|
786
|
+
}
|
|
787
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FilterFormComponent, deps: [{ token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
788
|
+
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"] }] }); }
|
|
753
789
|
}
|
|
754
790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: FilterFormComponent, decorators: [{
|
|
755
791
|
type: Component,
|
|
756
|
-
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\">\
|
|
757
|
-
}], ctorParameters: () => [], propDecorators: { filter: [{
|
|
792
|
+
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" }]
|
|
793
|
+
}], ctorParameters: () => [{ type: GlowwI18nService }], propDecorators: { filter: [{
|
|
758
794
|
type: Output
|
|
759
795
|
}] } });
|
|
760
796
|
|
|
@@ -985,7 +1021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
985
1021
|
|
|
986
1022
|
;
|
|
987
1023
|
class DisplayObjectsComponent {
|
|
988
|
-
constructor(glowwService, changeDetectorRef, dialog, router, location, authenticationService, formBuilder, route) {
|
|
1024
|
+
constructor(glowwService, changeDetectorRef, dialog, router, location, authenticationService, formBuilder, route, i18n) {
|
|
989
1025
|
this.changeDetectorRef = changeDetectorRef;
|
|
990
1026
|
this.dialog = dialog;
|
|
991
1027
|
this.router = router;
|
|
@@ -993,6 +1029,7 @@ class DisplayObjectsComponent {
|
|
|
993
1029
|
this.authenticationService = authenticationService;
|
|
994
1030
|
this.formBuilder = formBuilder;
|
|
995
1031
|
this.route = route;
|
|
1032
|
+
this.i18n = i18n;
|
|
996
1033
|
this.canDisplayObj = false;
|
|
997
1034
|
this.canEdit = true;
|
|
998
1035
|
this.canDelete = true;
|
|
@@ -1141,6 +1178,9 @@ class DisplayObjectsComponent {
|
|
|
1141
1178
|
ngOnDestroy() {
|
|
1142
1179
|
this.navSubscription?.unsubscribe(); // this prevents a memory leak
|
|
1143
1180
|
}
|
|
1181
|
+
t(key, fallback) {
|
|
1182
|
+
return this.i18n.instant(key, fallback);
|
|
1183
|
+
}
|
|
1144
1184
|
Init(data) {
|
|
1145
1185
|
if ((data && Object.keys(data).length > 0) || this.displayresult) {
|
|
1146
1186
|
this.Search(data);
|
|
@@ -1217,6 +1257,9 @@ class DisplayObjectsComponent {
|
|
|
1217
1257
|
this.queryParams[name] = this.queryParams[name];
|
|
1218
1258
|
});
|
|
1219
1259
|
}
|
|
1260
|
+
Object.keys(this.queryParams).forEach(name => {
|
|
1261
|
+
this.queryParams[name] = this.serializeQueryParamValue(this.queryParams[name]);
|
|
1262
|
+
});
|
|
1220
1263
|
this.queryParams['__guid'] = (Math.random().toString()).substring(2);
|
|
1221
1264
|
console.log("Before searchRequest");
|
|
1222
1265
|
//debugger;
|
|
@@ -1235,7 +1278,7 @@ class DisplayObjectsComponent {
|
|
|
1235
1278
|
}, error => {
|
|
1236
1279
|
this.displayresult = false;
|
|
1237
1280
|
this.displayform = true;
|
|
1238
|
-
this.resultException = error;
|
|
1281
|
+
this.resultException = this.toErrorMessage(error);
|
|
1239
1282
|
});
|
|
1240
1283
|
}
|
|
1241
1284
|
clean(obj) {
|
|
@@ -1250,8 +1293,7 @@ class DisplayObjectsComponent {
|
|
|
1250
1293
|
const searchData = this.parent.form.value.searchData;
|
|
1251
1294
|
if (searchData) {
|
|
1252
1295
|
Object.keys(searchData).forEach(name => {
|
|
1253
|
-
|
|
1254
|
-
this.queryParams[name] = val;
|
|
1296
|
+
this.queryParams[name] = this.serializeQueryParamValue(searchData[name]);
|
|
1255
1297
|
});
|
|
1256
1298
|
}
|
|
1257
1299
|
if (this.form2.value._MaxRow_) {
|
|
@@ -1263,6 +1305,18 @@ class DisplayObjectsComponent {
|
|
|
1263
1305
|
this.location.replaceState(this.router.url, params.toString());
|
|
1264
1306
|
this.Search();
|
|
1265
1307
|
}
|
|
1308
|
+
serializeQueryParamValue(value) {
|
|
1309
|
+
if (value === undefined || value === null || value === '') {
|
|
1310
|
+
return value;
|
|
1311
|
+
}
|
|
1312
|
+
if (value instanceof Date) {
|
|
1313
|
+
return Number.isNaN(value.getTime()) ? null : moment(value).format('YYYY-MM-DD HH:mm:ss');
|
|
1314
|
+
}
|
|
1315
|
+
if (moment.isMoment(value)) {
|
|
1316
|
+
return value.isValid() ? value.format('YYYY-MM-DD HH:mm:ss') : null;
|
|
1317
|
+
}
|
|
1318
|
+
return value;
|
|
1319
|
+
}
|
|
1266
1320
|
onFilter() {
|
|
1267
1321
|
}
|
|
1268
1322
|
UpdateDataSource(r) {
|
|
@@ -1418,9 +1472,10 @@ class DisplayObjectsComponent {
|
|
|
1418
1472
|
dialogConfig.disableClose = true;
|
|
1419
1473
|
dialogConfig.autoFocus = true;
|
|
1420
1474
|
dialogConfig.closeOnNavigation = false;
|
|
1421
|
-
dialogConfig.
|
|
1422
|
-
dialogConfig.
|
|
1423
|
-
dialogConfig.
|
|
1475
|
+
dialogConfig.panelClass = 'gw-resizable-dialog-panel';
|
|
1476
|
+
dialogConfig.width = '900px';
|
|
1477
|
+
dialogConfig.maxWidth = '100vw';
|
|
1478
|
+
dialogConfig.maxHeight = '100vh';
|
|
1424
1479
|
if (this.dialogConfig) {
|
|
1425
1480
|
Object.keys(this.dialogConfig).forEach(name => {
|
|
1426
1481
|
dialogConfig[name] = this.dialogConfig[name];
|
|
@@ -1476,14 +1531,14 @@ class DisplayObjectsComponent {
|
|
|
1476
1531
|
});
|
|
1477
1532
|
}
|
|
1478
1533
|
DeleteObj(obj) {
|
|
1479
|
-
if (confirm('Are you sure you want to delete this
|
|
1534
|
+
if (confirm(this.t('GLOWW.CONFIRM_DELETE', 'Are you sure you want to delete this object ?'))) {
|
|
1480
1535
|
this.deleteRequest.apply(this.glowwService, this.getPrimaryKey(obj)).subscribe(p => {
|
|
1481
1536
|
const i = this.dataSource.data.indexOf(obj);
|
|
1482
1537
|
const tmp = this.dataSource.data;
|
|
1483
1538
|
tmp.splice(i, 1);
|
|
1484
1539
|
this.dataSource.data = tmp;
|
|
1485
1540
|
}, error => {
|
|
1486
|
-
alert(
|
|
1541
|
+
alert(`${this.t('GLOWW.UNABLE_TO_DELETE_OBJECT', 'Unable to delete object')} ${error.status} ${error.statusText}\n${error.Message}\n${error.error}`);
|
|
1487
1542
|
});
|
|
1488
1543
|
}
|
|
1489
1544
|
}
|
|
@@ -1508,9 +1563,10 @@ class DisplayObjectsComponent {
|
|
|
1508
1563
|
dialogConfig.disableClose = true;
|
|
1509
1564
|
dialogConfig.autoFocus = true;
|
|
1510
1565
|
dialogConfig.closeOnNavigation = false;
|
|
1511
|
-
dialogConfig.
|
|
1512
|
-
dialogConfig.
|
|
1513
|
-
dialogConfig.
|
|
1566
|
+
dialogConfig.panelClass = 'gw-resizable-dialog-panel';
|
|
1567
|
+
dialogConfig.width = '900px';
|
|
1568
|
+
dialogConfig.maxWidth = '100vw';
|
|
1569
|
+
dialogConfig.maxHeight = '100vh';
|
|
1514
1570
|
if (this.dialogConfig) {
|
|
1515
1571
|
Object.keys(this.dialogConfig).forEach(name => {
|
|
1516
1572
|
dialogConfig[name] = this.dialogConfig[name];
|
|
@@ -1559,16 +1615,23 @@ class DisplayObjectsComponent {
|
|
|
1559
1615
|
}
|
|
1560
1616
|
});
|
|
1561
1617
|
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1618
|
+
toErrorMessage(error) {
|
|
1619
|
+
if (!error) {
|
|
1620
|
+
return '';
|
|
1621
|
+
}
|
|
1622
|
+
const details = error.error?.message || error.error || error.message || error.statusText || `${error}`;
|
|
1623
|
+
return `${this.t('GLOWW.UNABLE_TO_QUERY', 'Unable to query')} : ${details}`;
|
|
1624
|
+
}
|
|
1625
|
+
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 }); }
|
|
1626
|
+
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 }] }); }
|
|
1564
1627
|
}
|
|
1565
1628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DisplayObjectsComponent, decorators: [{
|
|
1566
1629
|
type: Component,
|
|
1567
|
-
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], 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
|
|
1630
|
+
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"] }]
|
|
1568
1631
|
}], ctorParameters: () => [{ type: GlowwService, decorators: [{
|
|
1569
1632
|
type: Inject,
|
|
1570
1633
|
args: ['glowwService']
|
|
1571
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }, { type: i2.Router }, { type: i3.Location }, { type: AuthenticationService }, { type: i1$3.UntypedFormBuilder }, { type: i2.ActivatedRoute }], propDecorators: { header: [{
|
|
1634
|
+
}] }, { 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: [{
|
|
1572
1635
|
type: ContentChild,
|
|
1573
1636
|
args: [HeaderComponent]
|
|
1574
1637
|
}], searchFormLayout: [{
|
|
@@ -1711,7 +1774,10 @@ class SecurePipe {
|
|
|
1711
1774
|
}
|
|
1712
1775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: SecurePipe, decorators: [{
|
|
1713
1776
|
type: Pipe,
|
|
1714
|
-
args: [{
|
|
1777
|
+
args: [{
|
|
1778
|
+
name: 'secure',
|
|
1779
|
+
standalone: true
|
|
1780
|
+
}]
|
|
1715
1781
|
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i1$1.DomSanitizer }] });
|
|
1716
1782
|
|
|
1717
1783
|
class MenuListItemComponent {
|
|
@@ -1722,9 +1788,10 @@ class MenuListItemComponent {
|
|
|
1722
1788
|
console.log("change expanded");
|
|
1723
1789
|
this._expanded = value;
|
|
1724
1790
|
}
|
|
1725
|
-
constructor(glowwService, navService, router) {
|
|
1791
|
+
constructor(glowwService, navService, router, i18n) {
|
|
1726
1792
|
this.navService = navService;
|
|
1727
1793
|
this.router = router;
|
|
1794
|
+
this.i18n = i18n;
|
|
1728
1795
|
this._expanded = false;
|
|
1729
1796
|
this.ariaExpanded = this.expanded;
|
|
1730
1797
|
this.falsePromise = new Promise((resolve, reject) => {
|
|
@@ -1768,6 +1835,9 @@ class MenuListItemComponent {
|
|
|
1768
1835
|
}
|
|
1769
1836
|
return route;
|
|
1770
1837
|
}
|
|
1838
|
+
displayName(item) {
|
|
1839
|
+
return this.i18n.instant(item.displayName, item.displayName);
|
|
1840
|
+
}
|
|
1771
1841
|
getDisabledPromise() {
|
|
1772
1842
|
//console.log(`isdisable item ${item.displayName} ${item.disabled}`);
|
|
1773
1843
|
if (!this.item.disabled) {
|
|
@@ -1781,8 +1851,8 @@ class MenuListItemComponent {
|
|
|
1781
1851
|
}
|
|
1782
1852
|
return this.item.hidden();
|
|
1783
1853
|
}
|
|
1784
|
-
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 }); }
|
|
1785
|
-
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\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 <
|
|
1854
|
+
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 }); }
|
|
1855
|
+
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: [
|
|
1786
1856
|
trigger('indicatorRotate', [
|
|
1787
1857
|
state('collapsed', style({ transform: 'rotate(0deg)' })),
|
|
1788
1858
|
state('expanded', style({ transform: 'rotate(180deg)' })),
|
|
@@ -1798,11 +1868,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
1798
1868
|
state('expanded', style({ transform: 'rotate(180deg)' })),
|
|
1799
1869
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)'))
|
|
1800
1870
|
])
|
|
1801
|
-
], imports: [NgStyle, NgClass, RouterLink, MatIcon,
|
|
1871
|
+
], 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"] }]
|
|
1802
1872
|
}], ctorParameters: () => [{ type: GlowwService, decorators: [{
|
|
1803
1873
|
type: Inject,
|
|
1804
1874
|
args: ['glowwService']
|
|
1805
|
-
}] }, { type: NavService }, { type: i2.Router }], propDecorators: { ariaExpanded: [{
|
|
1875
|
+
}] }, { type: NavService }, { type: i2.Router }, { type: GlowwI18nService }], propDecorators: { ariaExpanded: [{
|
|
1806
1876
|
type: HostBinding,
|
|
1807
1877
|
args: ['attr.aria-expanded']
|
|
1808
1878
|
}], item: [{
|
|
@@ -1986,7 +2056,10 @@ class HtmlFormatPipe {
|
|
|
1986
2056
|
}
|
|
1987
2057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: HtmlFormatPipe, decorators: [{
|
|
1988
2058
|
type: Pipe,
|
|
1989
|
-
args: [{
|
|
2059
|
+
args: [{
|
|
2060
|
+
name: 'htmlFormat',
|
|
2061
|
+
standalone: true
|
|
2062
|
+
}]
|
|
1990
2063
|
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
|
1991
2064
|
|
|
1992
2065
|
class SocialNetworkComponent {
|
|
@@ -2048,15 +2121,10 @@ class LoginComponent {
|
|
|
2048
2121
|
if (config && config.showDomain) {
|
|
2049
2122
|
this.showDomain = config.showDomain;
|
|
2050
2123
|
}
|
|
2124
|
+
this.initializeForms();
|
|
2051
2125
|
this.authenticationService.getOAuthProviders().subscribe(oap => this.oAuthProviders = oap);
|
|
2052
2126
|
}
|
|
2053
|
-
|
|
2054
|
-
if (!fg) {
|
|
2055
|
-
return;
|
|
2056
|
-
}
|
|
2057
|
-
return fg.get('newpassword')?.value === fg.get('confirmationPassword')?.value;
|
|
2058
|
-
}
|
|
2059
|
-
ngOnInit() {
|
|
2127
|
+
initializeForms() {
|
|
2060
2128
|
const grp = {
|
|
2061
2129
|
username: ['', Validators.required],
|
|
2062
2130
|
password: ['', Validators.required]
|
|
@@ -2079,6 +2147,14 @@ class LoginComponent {
|
|
|
2079
2147
|
this.loginForm = this.formBuilder.group(grp);
|
|
2080
2148
|
this.lostPasswordForm = this.formBuilder.group(lostPwd);
|
|
2081
2149
|
this.resetPasswordForm = this.formBuilder.group(resetPwd, { validator: this.MatchPassword });
|
|
2150
|
+
}
|
|
2151
|
+
MatchPassword(fg) {
|
|
2152
|
+
if (!fg) {
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
return fg.get('newpassword')?.value === fg.get('confirmationPassword')?.value;
|
|
2156
|
+
}
|
|
2157
|
+
ngOnInit() {
|
|
2082
2158
|
// get return url from route parameters or default to '/'
|
|
2083
2159
|
this.returnUrl = this.route.snapshot.queryParams.returnUrl; //|| window.location.search;
|
|
2084
2160
|
this.application = this.route.snapshot.queryParams.application; //|| window.location.pathname;
|
|
@@ -2499,6 +2575,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
2499
2575
|
}]
|
|
2500
2576
|
}], ctorParameters: () => [{ type: i2.Router }, { type: AuthenticationService }, { type: i3.PlatformLocation }] });
|
|
2501
2577
|
|
|
2578
|
+
const GLOWW_SECURITY_STANDALONE_DECLARATIONS = [
|
|
2579
|
+
LoginComponent,
|
|
2580
|
+
ChangePasswordDlgComponent,
|
|
2581
|
+
UserMenuComponent,
|
|
2582
|
+
SocialNetworkDlgComponent,
|
|
2583
|
+
SocialNetworkComponent
|
|
2584
|
+
];
|
|
2585
|
+
function getGlowwSecurityProviders(authenticationServiceConfig) {
|
|
2586
|
+
return [
|
|
2587
|
+
AuthenticationService,
|
|
2588
|
+
AuthenticationServiceConfig,
|
|
2589
|
+
{ provide: AuthenticationServiceConfig, useValue: authenticationServiceConfig },
|
|
2590
|
+
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
|
|
2591
|
+
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
|
2592
|
+
//{ provide: HTTP_INTERCEPTORS, useClass: StagingInterceptor, multi: true },
|
|
2593
|
+
//socialLoginProviders
|
|
2594
|
+
];
|
|
2595
|
+
}
|
|
2596
|
+
function provideGlowwSecurity(authenticationServiceConfig) {
|
|
2597
|
+
return makeEnvironmentProviders([
|
|
2598
|
+
provideHttpClient(withInterceptorsFromDi()),
|
|
2599
|
+
...getGlowwSecurityProviders(authenticationServiceConfig)
|
|
2600
|
+
]);
|
|
2601
|
+
}
|
|
2502
2602
|
class GlowwSecurityModule {
|
|
2503
2603
|
static forRoot(authenticationServiceConfig) {
|
|
2504
2604
|
/*
|
|
@@ -2557,23 +2657,13 @@ class GlowwSecurityModule {
|
|
|
2557
2657
|
*/
|
|
2558
2658
|
return {
|
|
2559
2659
|
ngModule: GlowwSecurityModule,
|
|
2560
|
-
providers:
|
|
2561
|
-
AuthenticationService,
|
|
2562
|
-
AuthenticationServiceConfig,
|
|
2563
|
-
{ provide: AuthenticationServiceConfig, useValue: authenticationServiceConfig },
|
|
2564
|
-
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
|
|
2565
|
-
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
|
2566
|
-
//{ provide: HTTP_INTERCEPTORS, useClass: StagingInterceptor, multi: true },
|
|
2567
|
-
//socialLoginProviders
|
|
2568
|
-
]
|
|
2660
|
+
providers: getGlowwSecurityProviders(authenticationServiceConfig)
|
|
2569
2661
|
};
|
|
2570
2662
|
}
|
|
2571
2663
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwSecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2572
2664
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: GlowwSecurityModule, imports: [CommonModule,
|
|
2573
2665
|
FormsModule,
|
|
2574
2666
|
ReactiveFormsModule,
|
|
2575
|
-
BrowserModule,
|
|
2576
|
-
BrowserAnimationsModule,
|
|
2577
2667
|
MatToolbarModule,
|
|
2578
2668
|
MatButtonModule,
|
|
2579
2669
|
MatSidenavModule,
|
|
@@ -2585,12 +2675,14 @@ class GlowwSecurityModule {
|
|
|
2585
2675
|
ChangePasswordDlgComponent,
|
|
2586
2676
|
UserMenuComponent,
|
|
2587
2677
|
SocialNetworkDlgComponent,
|
|
2588
|
-
SocialNetworkComponent], exports: [LoginComponent,
|
|
2678
|
+
SocialNetworkComponent], exports: [LoginComponent,
|
|
2679
|
+
ChangePasswordDlgComponent,
|
|
2680
|
+
UserMenuComponent,
|
|
2681
|
+
SocialNetworkDlgComponent,
|
|
2682
|
+
SocialNetworkComponent, RouterModule] }); }
|
|
2589
2683
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwSecurityModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
|
|
2590
2684
|
FormsModule,
|
|
2591
2685
|
ReactiveFormsModule,
|
|
2592
|
-
BrowserModule,
|
|
2593
|
-
BrowserAnimationsModule,
|
|
2594
2686
|
MatToolbarModule,
|
|
2595
2687
|
MatButtonModule,
|
|
2596
2688
|
MatSidenavModule,
|
|
@@ -2605,11 +2697,9 @@ class GlowwSecurityModule {
|
|
|
2605
2697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwSecurityModule, decorators: [{
|
|
2606
2698
|
type: NgModule,
|
|
2607
2699
|
args: [{
|
|
2608
|
-
exports: [
|
|
2700
|
+
exports: [...GLOWW_SECURITY_STANDALONE_DECLARATIONS, RouterModule], imports: [CommonModule,
|
|
2609
2701
|
FormsModule,
|
|
2610
2702
|
ReactiveFormsModule,
|
|
2611
|
-
BrowserModule,
|
|
2612
|
-
BrowserAnimationsModule,
|
|
2613
2703
|
MatToolbarModule,
|
|
2614
2704
|
MatButtonModule,
|
|
2615
2705
|
MatSidenavModule,
|
|
@@ -2617,11 +2707,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
2617
2707
|
MatFormFieldModule,
|
|
2618
2708
|
MatCardModule,
|
|
2619
2709
|
MatDialogModule,
|
|
2620
|
-
RouterModule,
|
|
2621
|
-
|
|
2622
|
-
UserMenuComponent,
|
|
2623
|
-
SocialNetworkDlgComponent,
|
|
2624
|
-
SocialNetworkComponent], providers: [provideHttpClient(withInterceptorsFromDi())]
|
|
2710
|
+
RouterModule,
|
|
2711
|
+
...GLOWW_SECURITY_STANDALONE_DECLARATIONS], providers: [provideHttpClient(withInterceptorsFromDi())]
|
|
2625
2712
|
}]
|
|
2626
2713
|
}] });
|
|
2627
2714
|
|
|
@@ -3525,31 +3612,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3525
3612
|
}] } });
|
|
3526
3613
|
|
|
3527
3614
|
class DatetimeComponent {
|
|
3528
|
-
|
|
3615
|
+
static { this.DATE_FORMATS = [
|
|
3616
|
+
moment.ISO_8601,
|
|
3617
|
+
'DD/MM/YYYY HH:mm:ss',
|
|
3618
|
+
'DD/MM/YYYY HH:mm',
|
|
3619
|
+
'DD/MM/YYYY',
|
|
3620
|
+
'MM/DD/YYYY HH:mm:ss',
|
|
3621
|
+
'MM/DD/YYYY HH:mm',
|
|
3622
|
+
'MM/DD/YYYY',
|
|
3623
|
+
'YYYY-MM-DD HH:mm:ss',
|
|
3624
|
+
'YYYY-MM-DD HH:mm',
|
|
3625
|
+
'YYYY-MM-DD',
|
|
3626
|
+
'YYYY-MM-DDTHH:mm:ss',
|
|
3627
|
+
'YYYY-MM-DDTHH:mm'
|
|
3628
|
+
]; }
|
|
3629
|
+
static { this.CLOCK_CENTER = 50; }
|
|
3630
|
+
static { this.CLOCK_OUTER_RADIUS = 40; }
|
|
3631
|
+
static { this.CLOCK_INNER_RADIUS = 27; }
|
|
3632
|
+
static { this.CLOCK_TICK_OUTER_RADIUS = 48; }
|
|
3633
|
+
static { this.CLOCK_TICK_INNER_RADIUS = 41; }
|
|
3634
|
+
static { this.CLOCK_TICK_LABEL_RADIUS = 34; }
|
|
3635
|
+
static { this.CLOCK_OUTER_HAND_HEIGHT = '40%'; }
|
|
3636
|
+
static { this.CLOCK_INNER_HAND_HEIGHT = '27%'; }
|
|
3637
|
+
static { this.CLOCK_MINUTE_HAND_HEIGHT = '48%'; }
|
|
3638
|
+
constructor(locale) {
|
|
3639
|
+
this.locale = locale;
|
|
3529
3640
|
this._value = null;
|
|
3530
3641
|
this.display = null;
|
|
3531
3642
|
this.placeHolder = null;
|
|
3532
3643
|
this.mode = 'date';
|
|
3533
|
-
this.showSpinners = true;
|
|
3534
3644
|
this.showSeconds = false;
|
|
3535
|
-
this.
|
|
3645
|
+
this.dateControl = new FormControl(null);
|
|
3646
|
+
this.hourControl = new FormControl('00', { nonNullable: true });
|
|
3647
|
+
this.minuteControl = new FormControl('00', { nonNullable: true });
|
|
3648
|
+
this.secondControl = new FormControl('00', { nonNullable: true });
|
|
3649
|
+
this.hourMarkers = this.buildHourMarkers();
|
|
3650
|
+
this.minuteTicks = this.buildUnitTicks();
|
|
3651
|
+
this.secondTicks = this.buildUnitTicks();
|
|
3652
|
+
this.isDisabled = false;
|
|
3653
|
+
this.isClockOpen = false;
|
|
3654
|
+
this.clockStep = 'hour';
|
|
3536
3655
|
this.onChange = () => { };
|
|
3537
3656
|
this.onTouched = () => { };
|
|
3657
|
+
this.dateControl.valueChanges.subscribe(() => this.emitCurrentValue());
|
|
3658
|
+
this.hourControl.valueChanges.subscribe(() => this.emitCurrentValue());
|
|
3659
|
+
this.minuteControl.valueChanges.subscribe(() => this.emitCurrentValue());
|
|
3660
|
+
this.secondControl.valueChanges.subscribe(() => this.emitCurrentValue());
|
|
3661
|
+
}
|
|
3662
|
+
get isDateTime() {
|
|
3663
|
+
return this.mode === 'datetime';
|
|
3538
3664
|
}
|
|
3539
3665
|
get value() {
|
|
3540
3666
|
return this._value;
|
|
3541
3667
|
}
|
|
3542
3668
|
set value(val) {
|
|
3543
|
-
this.
|
|
3544
|
-
let dt = this._value;
|
|
3545
|
-
if (typeof (this._value) === 'string') {
|
|
3546
|
-
dt = moment(this._value).toISOString();
|
|
3547
|
-
}
|
|
3548
|
-
this.onChange(dt);
|
|
3549
|
-
this.onTouched();
|
|
3669
|
+
this.setValueFromOutside(val, true);
|
|
3550
3670
|
}
|
|
3551
3671
|
writeValue(obj) {
|
|
3552
|
-
this.
|
|
3672
|
+
this.setValueFromOutside(obj, false);
|
|
3553
3673
|
}
|
|
3554
3674
|
registerOnChange(fn) {
|
|
3555
3675
|
this.onChange = fn;
|
|
@@ -3558,27 +3678,304 @@ class DatetimeComponent {
|
|
|
3558
3678
|
this.onTouched = fn;
|
|
3559
3679
|
}
|
|
3560
3680
|
setDisabledState(isDisabled) {
|
|
3561
|
-
|
|
3681
|
+
this.isDisabled = isDisabled;
|
|
3682
|
+
const action = isDisabled ? 'disable' : 'enable';
|
|
3683
|
+
this.dateControl[action]({ emitEvent: false });
|
|
3684
|
+
this.hourControl[action]({ emitEvent: false });
|
|
3685
|
+
this.minuteControl[action]({ emitEvent: false });
|
|
3686
|
+
this.secondControl[action]({ emitEvent: false });
|
|
3687
|
+
}
|
|
3688
|
+
clear() {
|
|
3689
|
+
this._value = null;
|
|
3690
|
+
this.isClockOpen = false;
|
|
3691
|
+
this.dateControl.setValue(null, { emitEvent: false });
|
|
3692
|
+
this.hourControl.setValue('00', { emitEvent: false });
|
|
3693
|
+
this.minuteControl.setValue('00', { emitEvent: false });
|
|
3694
|
+
this.secondControl.setValue('00', { emitEvent: false });
|
|
3695
|
+
this.onChange(null);
|
|
3696
|
+
this.onTouched();
|
|
3697
|
+
}
|
|
3698
|
+
markTouched() {
|
|
3699
|
+
this.onTouched();
|
|
3700
|
+
}
|
|
3701
|
+
get timeSummary() {
|
|
3702
|
+
return this.showSeconds
|
|
3703
|
+
? `${this.normalizeTimePartValue(this.hourControl.value, 23, true)}:${this.normalizeTimePartValue(this.minuteControl.value, 59, true)}:${this.normalizeTimePartValue(this.secondControl.value, 59, true)}`
|
|
3704
|
+
: `${this.normalizeTimePartValue(this.hourControl.value, 23, true)}:${this.normalizeTimePartValue(this.minuteControl.value, 59, true)}`;
|
|
3562
3705
|
}
|
|
3563
|
-
|
|
3564
|
-
|
|
3706
|
+
get clockTitle() {
|
|
3707
|
+
switch (this.clockStep) {
|
|
3708
|
+
case 'hour':
|
|
3709
|
+
return 'Hours';
|
|
3710
|
+
case 'minute':
|
|
3711
|
+
return 'Minutes';
|
|
3712
|
+
default:
|
|
3713
|
+
return 'Seconds';
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
openClock() {
|
|
3717
|
+
if (this.isDisabled) {
|
|
3718
|
+
return;
|
|
3719
|
+
}
|
|
3720
|
+
this.isClockOpen = true;
|
|
3721
|
+
this.clockStep = 'hour';
|
|
3722
|
+
this.onTouched();
|
|
3723
|
+
}
|
|
3724
|
+
closeClock() {
|
|
3725
|
+
this.isClockOpen = false;
|
|
3726
|
+
this.onTouched();
|
|
3727
|
+
}
|
|
3728
|
+
onTimePartInput(part) {
|
|
3729
|
+
const control = this.getTimeControl(part);
|
|
3730
|
+
const max = this.getTimePartMax(part);
|
|
3731
|
+
control.setValue(this.normalizeTimePartValue(control.value, max, false), { emitEvent: false });
|
|
3732
|
+
this.emitCurrentValue();
|
|
3733
|
+
}
|
|
3734
|
+
onTimePartBlur(part) {
|
|
3735
|
+
const control = this.getTimeControl(part);
|
|
3736
|
+
const max = this.getTimePartMax(part);
|
|
3737
|
+
control.setValue(this.normalizeTimePartValue(control.value, max, true), { emitEvent: false });
|
|
3738
|
+
this.emitCurrentValue();
|
|
3739
|
+
this.onTouched();
|
|
3740
|
+
}
|
|
3741
|
+
selectClockHour(value, event) {
|
|
3742
|
+
event?.stopPropagation();
|
|
3743
|
+
this.hourControl.setValue(value.toString().padStart(2, '0'), { emitEvent: false });
|
|
3744
|
+
this.emitCurrentValue();
|
|
3745
|
+
this.clockStep = 'minute';
|
|
3746
|
+
this.onTouched();
|
|
3747
|
+
}
|
|
3748
|
+
selectClockMinute(value, event) {
|
|
3749
|
+
event?.stopPropagation();
|
|
3750
|
+
this.minuteControl.setValue(value.toString().padStart(2, '0'), { emitEvent: false });
|
|
3751
|
+
this.emitCurrentValue();
|
|
3752
|
+
if (this.showSeconds) {
|
|
3753
|
+
this.clockStep = 'second';
|
|
3754
|
+
}
|
|
3755
|
+
else {
|
|
3756
|
+
this.closeClock();
|
|
3757
|
+
}
|
|
3758
|
+
this.onTouched();
|
|
3759
|
+
}
|
|
3760
|
+
selectClockSecond(value, event) {
|
|
3761
|
+
event?.stopPropagation();
|
|
3762
|
+
this.secondControl.setValue(value.toString().padStart(2, '0'), { emitEvent: false });
|
|
3763
|
+
this.emitCurrentValue();
|
|
3764
|
+
this.closeClock();
|
|
3765
|
+
this.onTouched();
|
|
3766
|
+
}
|
|
3767
|
+
selectClockTick(value, event) {
|
|
3768
|
+
if (this.clockStep === 'minute') {
|
|
3769
|
+
this.selectClockMinute(value, event);
|
|
3770
|
+
return;
|
|
3771
|
+
}
|
|
3772
|
+
if (this.clockStep === 'second') {
|
|
3773
|
+
this.selectClockSecond(value, event);
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
goToClockStep(step) {
|
|
3777
|
+
this.clockStep = step;
|
|
3778
|
+
}
|
|
3779
|
+
onClockFaceClick(event) {
|
|
3780
|
+
if (this.clockStep === 'hour') {
|
|
3781
|
+
return;
|
|
3782
|
+
}
|
|
3783
|
+
const target = event.currentTarget;
|
|
3784
|
+
if (!target) {
|
|
3785
|
+
return;
|
|
3786
|
+
}
|
|
3787
|
+
const rect = target.getBoundingClientRect();
|
|
3788
|
+
const centerX = rect.left + (rect.width / 2);
|
|
3789
|
+
const centerY = rect.top + (rect.height / 2);
|
|
3790
|
+
const dx = event.clientX - centerX;
|
|
3791
|
+
const dy = event.clientY - centerY;
|
|
3792
|
+
const angle = Math.atan2(dy, dx) + (Math.PI / 2);
|
|
3793
|
+
const normalized = angle < 0 ? angle + (Math.PI * 2) : angle;
|
|
3794
|
+
const rawValue = Math.round((normalized / (Math.PI * 2)) * 60) % 60;
|
|
3795
|
+
if (this.clockStep === 'minute') {
|
|
3796
|
+
this.selectClockMinute(rawValue);
|
|
3797
|
+
return;
|
|
3798
|
+
}
|
|
3799
|
+
this.selectClockSecond(rawValue);
|
|
3800
|
+
}
|
|
3801
|
+
isHourSelected(value) {
|
|
3802
|
+
return this.toNumber(this.hourControl.value) === value;
|
|
3803
|
+
}
|
|
3804
|
+
isMinuteSelected(value) {
|
|
3805
|
+
return this.toNumber(this.minuteControl.value) === value;
|
|
3806
|
+
}
|
|
3807
|
+
isSecondSelected(value) {
|
|
3808
|
+
return this.toNumber(this.secondControl.value) === value;
|
|
3809
|
+
}
|
|
3810
|
+
get clockHandTransform() {
|
|
3811
|
+
if (this.clockStep === 'hour') {
|
|
3812
|
+
const hour = this.toNumber(this.hourControl.value) % 12;
|
|
3813
|
+
return `translate(-50%, -100%) rotate(${(hour / 12) * 360}deg)`;
|
|
3814
|
+
}
|
|
3815
|
+
if (this.clockStep === 'minute') {
|
|
3816
|
+
const minute = this.toNumber(this.minuteControl.value) % 60;
|
|
3817
|
+
return `translate(-50%, -100%) rotate(${(minute / 60) * 360}deg)`;
|
|
3818
|
+
}
|
|
3819
|
+
const second = this.toNumber(this.secondControl.value) % 60;
|
|
3820
|
+
return `translate(-50%, -100%) rotate(${(second / 60) * 360}deg)`;
|
|
3821
|
+
}
|
|
3822
|
+
get clockHandHeight() {
|
|
3823
|
+
if (this.clockStep === 'hour') {
|
|
3824
|
+
const hour = this.toNumber(this.hourControl.value);
|
|
3825
|
+
return hour < 12 ? '38%' : '25%';
|
|
3826
|
+
}
|
|
3827
|
+
return '45%';
|
|
3828
|
+
}
|
|
3829
|
+
get hourHandTransform() {
|
|
3830
|
+
const hour = this.toNumber(this.hourControl.value) % 12;
|
|
3831
|
+
return `translate(-50%, -100%) rotate(${(hour / 12) * 360}deg)`;
|
|
3832
|
+
}
|
|
3833
|
+
get hourHandHeight() {
|
|
3834
|
+
const hour = this.toNumber(this.hourControl.value);
|
|
3835
|
+
return hour < 12 ? DatetimeComponent.CLOCK_OUTER_HAND_HEIGHT : DatetimeComponent.CLOCK_INNER_HAND_HEIGHT;
|
|
3836
|
+
}
|
|
3837
|
+
get minuteHandTransform() {
|
|
3838
|
+
const minute = (this.toNumber(this.minuteControl.value) % 60) + (this.toNumber(this.secondControl.value) / 60);
|
|
3839
|
+
return `translate(-50%, -100%) rotate(${(minute / 60) * 360}deg)`;
|
|
3840
|
+
}
|
|
3841
|
+
get minuteHandHeight() {
|
|
3842
|
+
return DatetimeComponent.CLOCK_MINUTE_HAND_HEIGHT;
|
|
3843
|
+
}
|
|
3844
|
+
setValueFromOutside(value, emit) {
|
|
3845
|
+
const normalized = this.normalizeDateValue(value);
|
|
3846
|
+
this._value = normalized;
|
|
3847
|
+
this.dateControl.setValue(normalized ? new Date(normalized.getTime()) : null, { emitEvent: false });
|
|
3848
|
+
this.hourControl.setValue(normalized ? normalized.getHours().toString().padStart(2, '0') : '00', { emitEvent: false });
|
|
3849
|
+
this.minuteControl.setValue(normalized ? normalized.getMinutes().toString().padStart(2, '0') : '00', { emitEvent: false });
|
|
3850
|
+
this.secondControl.setValue(normalized ? normalized.getSeconds().toString().padStart(2, '0') : '00', { emitEvent: false });
|
|
3851
|
+
if (emit) {
|
|
3852
|
+
this.onChange(normalized);
|
|
3853
|
+
this.onTouched();
|
|
3854
|
+
}
|
|
3855
|
+
}
|
|
3856
|
+
emitCurrentValue() {
|
|
3857
|
+
const date = this.normalizeDateValue(this.dateControl.value);
|
|
3858
|
+
if (!date) {
|
|
3859
|
+
this._value = null;
|
|
3860
|
+
this.onChange(null);
|
|
3861
|
+
return;
|
|
3862
|
+
}
|
|
3863
|
+
const next = new Date(date.getTime());
|
|
3864
|
+
next.setHours(this.toNumber(this.hourControl.value), this.toNumber(this.minuteControl.value), this.showSeconds ? this.toNumber(this.secondControl.value) : 0, 0);
|
|
3865
|
+
this._value = next;
|
|
3866
|
+
this.onChange(next);
|
|
3867
|
+
}
|
|
3868
|
+
toNumber(value) {
|
|
3869
|
+
const parsed = Number.parseInt(value ?? '0', 10);
|
|
3870
|
+
return Number.isNaN(parsed) ? 0 : parsed;
|
|
3871
|
+
}
|
|
3872
|
+
getTimeControl(part) {
|
|
3873
|
+
switch (part) {
|
|
3874
|
+
case 'hour':
|
|
3875
|
+
return this.hourControl;
|
|
3876
|
+
case 'minute':
|
|
3877
|
+
return this.minuteControl;
|
|
3878
|
+
default:
|
|
3879
|
+
return this.secondControl;
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
getTimePartMax(part) {
|
|
3883
|
+
return part === 'hour' ? 23 : 59;
|
|
3884
|
+
}
|
|
3885
|
+
normalizeTimePartValue(value, max, pad) {
|
|
3886
|
+
const digits = `${value ?? ''}`.replace(/\D/g, '').slice(-2);
|
|
3887
|
+
if (!digits) {
|
|
3888
|
+
return pad ? '00' : '';
|
|
3889
|
+
}
|
|
3890
|
+
const parsed = Number.parseInt(digits, 10);
|
|
3891
|
+
const clamped = Number.isNaN(parsed) ? 0 : Math.min(max, Math.max(0, parsed));
|
|
3892
|
+
return pad || digits.length > 1 ? clamped.toString().padStart(2, '0') : clamped.toString();
|
|
3893
|
+
}
|
|
3894
|
+
normalizeDateValue(value) {
|
|
3895
|
+
if (value === undefined || value === null || value === '') {
|
|
3896
|
+
return null;
|
|
3897
|
+
}
|
|
3898
|
+
if (value instanceof Date) {
|
|
3899
|
+
return Number.isNaN(value.getTime()) ? null : new Date(value.getTime());
|
|
3900
|
+
}
|
|
3901
|
+
if (moment.isMoment(value)) {
|
|
3902
|
+
const date = value.toDate();
|
|
3903
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
3904
|
+
}
|
|
3905
|
+
if (typeof value === 'string' || typeof value === 'number') {
|
|
3906
|
+
const strictMoment = moment(value, DatetimeComponent.DATE_FORMATS, this.locale ?? undefined, true);
|
|
3907
|
+
if (strictMoment.isValid()) {
|
|
3908
|
+
return strictMoment.toDate();
|
|
3909
|
+
}
|
|
3910
|
+
const lenientMoment = moment(value, DatetimeComponent.DATE_FORMATS, this.locale ?? undefined, false);
|
|
3911
|
+
if (lenientMoment.isValid()) {
|
|
3912
|
+
return lenientMoment.toDate();
|
|
3913
|
+
}
|
|
3914
|
+
const date = new Date(value);
|
|
3915
|
+
return Number.isNaN(date.getTime()) ? null : date;
|
|
3916
|
+
}
|
|
3917
|
+
return null;
|
|
3918
|
+
}
|
|
3919
|
+
buildHourMarkers() {
|
|
3920
|
+
return Array.from({ length: 24 }, (_, index) => this.buildClockMarker(index, index < 12 ? DatetimeComponent.CLOCK_OUTER_RADIUS : DatetimeComponent.CLOCK_INNER_RADIUS, index.toString().padStart(2, '0')));
|
|
3921
|
+
}
|
|
3922
|
+
buildUnitTicks() {
|
|
3923
|
+
return Array.from({ length: 12 }, (_, index) => {
|
|
3924
|
+
const value = index * 5;
|
|
3925
|
+
const angle = (index / 12) * (Math.PI * 2) - (Math.PI / 2);
|
|
3926
|
+
const x1 = DatetimeComponent.CLOCK_CENTER + Math.cos(angle) * DatetimeComponent.CLOCK_TICK_INNER_RADIUS;
|
|
3927
|
+
const y1 = DatetimeComponent.CLOCK_CENTER + Math.sin(angle) * DatetimeComponent.CLOCK_TICK_INNER_RADIUS;
|
|
3928
|
+
const x2 = DatetimeComponent.CLOCK_CENTER + Math.cos(angle) * DatetimeComponent.CLOCK_TICK_OUTER_RADIUS;
|
|
3929
|
+
const y2 = DatetimeComponent.CLOCK_CENTER + Math.sin(angle) * DatetimeComponent.CLOCK_TICK_OUTER_RADIUS;
|
|
3930
|
+
const labelX = DatetimeComponent.CLOCK_CENTER + Math.cos(angle) * DatetimeComponent.CLOCK_TICK_LABEL_RADIUS;
|
|
3931
|
+
const labelY = DatetimeComponent.CLOCK_CENTER + Math.sin(angle) * DatetimeComponent.CLOCK_TICK_LABEL_RADIUS;
|
|
3932
|
+
return {
|
|
3933
|
+
value,
|
|
3934
|
+
label: value.toString().padStart(2, '0'),
|
|
3935
|
+
x1: `${x1}%`,
|
|
3936
|
+
y1: `${y1}%`,
|
|
3937
|
+
x2: `${x2}%`,
|
|
3938
|
+
y2: `${y2}%`,
|
|
3939
|
+
labelLeft: `${labelX}%`,
|
|
3940
|
+
labelTop: `${labelY}%`,
|
|
3941
|
+
};
|
|
3942
|
+
});
|
|
3943
|
+
}
|
|
3944
|
+
buildClockMarker(index, radius, label) {
|
|
3945
|
+
const angle = ((index % 12) / 12) * (Math.PI * 2) - (Math.PI / 2);
|
|
3946
|
+
const x = DatetimeComponent.CLOCK_CENTER + Math.cos(angle) * radius;
|
|
3947
|
+
const y = DatetimeComponent.CLOCK_CENTER + Math.sin(angle) * radius;
|
|
3948
|
+
return {
|
|
3949
|
+
value: index,
|
|
3950
|
+
label,
|
|
3951
|
+
left: `${x}%`,
|
|
3952
|
+
top: `${y}%`
|
|
3953
|
+
};
|
|
3954
|
+
}
|
|
3955
|
+
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 }); }
|
|
3956
|
+
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", showSeconds: "showSeconds" }, providers: [
|
|
3565
3957
|
{
|
|
3566
3958
|
provide: NG_VALUE_ACCESSOR,
|
|
3567
3959
|
multi: true,
|
|
3568
|
-
useExisting: DatetimeComponent
|
|
3960
|
+
useExisting: forwardRef(() => DatetimeComponent)
|
|
3569
3961
|
}
|
|
3570
|
-
], 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]=\"true\" [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: NgxMatDatetimePickerModule }, { kind: "component", type: i2$1.NgxMatDatetimepicker, selector: "ngx-mat-datetime-picker", exportAs: ["ngxMatDatetimePicker"] }, { kind: "directive", type: i2$1.NgxMatDatepickerInput, selector: "input[ngxMatDatetimePicker]", inputs: ["ngxMatDatetimePicker", "min", "max", "matDatepickerFilter"], exportAs: ["ngxMatDatepickerInput"] }] }); }
|
|
3962
|
+
], ngImport: i0, template: "<div class=\"datetime-wrapper\" [class.datetime-mode]=\"isDateTime\" [class.has-seconds]=\"showSeconds\">\n <mat-form-field class=\"date-field\">\n @if (display) {\n <mat-label>{{ display }}</mat-label>\n }\n <input\n matInput\n [matDatepicker]=\"picker\"\n [placeholder]=\"placeHolder\"\n [formControl]=\"dateControl\"\n [disabled]=\"isDisabled\"\n (dateChange)=\"markTouched()\"\n (blur)=\"markTouched()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n\n @if (isDateTime) {\n <div class=\"middle-actions\">\n <button\n mat-icon-button\n type=\"button\"\n class=\"icon-action\"\n [disabled]=\"isDisabled\"\n title=\"Clear date and time\"\n aria-label=\"Clear date and time\"\n (click)=\"clear()\">\n <i class=\"fal fa-eraser\"></i>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n class=\"icon-action\"\n [disabled]=\"isDisabled\"\n title=\"Open time clock\"\n aria-label=\"Open time clock\"\n (click)=\"openClock()\">\n <i class=\"fal fa-clock\"></i>\n </button>\n </div>\n\n <div class=\"time-row\">\n <mat-form-field class=\"time-field\">\n <mat-label>HH</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"23\"\n inputmode=\"numeric\"\n [formControl]=\"hourControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('hour')\"\n (blur)=\"onTimePartBlur('hour')\">\n </mat-form-field>\n\n <mat-form-field class=\"time-field\">\n <mat-label>MM</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"59\"\n inputmode=\"numeric\"\n [formControl]=\"minuteControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('minute')\"\n (blur)=\"onTimePartBlur('minute')\">\n </mat-form-field>\n\n @if (showSeconds) {\n <mat-form-field class=\"time-field\">\n <mat-label>SS</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"59\"\n inputmode=\"numeric\"\n [formControl]=\"secondControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('second')\"\n (blur)=\"onTimePartBlur('second')\">\n </mat-form-field>\n }\n </div>\n\n @if (isClockOpen) {\n <div class=\"clock-backdrop\" (click)=\"closeClock()\"></div>\n\n <div class=\"clock-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"clock-panel\">\n <div class=\"clock-panel-header\">\n <div class=\"clock-panel-title\">{{ clockTitle }}</div>\n <button\n mat-button\n type=\"button\"\n class=\"clock-close\"\n [disabled]=\"isDisabled\"\n (click)=\"closeClock()\">\n Close\n </button>\n </div>\n\n <div class=\"clock-summary\">\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'hour'\" (click)=\"goToClockStep('hour')\">\n {{ hourControl.value || '00' }}\n </button>\n <span>:</span>\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'minute'\" (click)=\"goToClockStep('minute')\">\n {{ minuteControl.value || '00' }}\n </button>\n @if (showSeconds) {\n <span>:</span>\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'second'\" (click)=\"goToClockStep('second')\">\n {{ secondControl.value || '00' }}\n </button>\n }\n </div>\n\n <div class=\"clock-face\" [class.clickable-face]=\"clockStep !== 'hour'\" [class.hour-face]=\"clockStep === 'hour'\" (click)=\"onClockFaceClick($event)\">\n <div class=\"clock-hand clock-hour-hand\" [style.transform]=\"hourHandTransform\" [style.height]=\"hourHandHeight\"></div>\n <div class=\"clock-hand clock-minute-hand\" [style.transform]=\"minuteHandTransform\" [style.height]=\"minuteHandHeight\"></div>\n\n @if (clockStep === 'hour') {\n @for (marker of hourMarkers; track marker.value) {\n <button\n type=\"button\"\n class=\"clock-hour-label\"\n [class.selected]=\"isHourSelected(marker.value)\"\n [class.inner-ring]=\"marker.value >= 12\"\n [style.left]=\"marker.left\"\n [style.top]=\"marker.top\"\n (click)=\"selectClockHour(marker.value, $event)\">\n {{ marker.label }}\n </button>\n }\n }\n\n @if (clockStep === 'minute') {\n <svg class=\"clock-ticks-svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n @for (tick of minuteTicks; track tick.value) {\n <line\n class=\"clock-tick-line\"\n [class.selected]=\"isMinuteSelected(tick.value)\"\n [attr.x1]=\"tick.x1\"\n [attr.y1]=\"tick.y1\"\n [attr.x2]=\"tick.x2\"\n [attr.y2]=\"tick.y2\"\n (click)=\"selectClockTick(tick.value, $event)\"></line>\n }\n </svg>\n @for (tick of minuteTicks; track tick.value) {\n <div\n class=\"clock-tick-label\"\n [class.selected]=\"isMinuteSelected(tick.value)\"\n [style.left]=\"tick.labelLeft\"\n [style.top]=\"tick.labelTop\"\n (click)=\"selectClockTick(tick.value, $event)\">\n {{ tick.label }}\n </div>\n }\n }\n\n @if (clockStep === 'second') {\n <svg class=\"clock-ticks-svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n @for (tick of secondTicks; track tick.value) {\n <line\n class=\"clock-tick-line\"\n [class.selected]=\"isSecondSelected(tick.value)\"\n [attr.x1]=\"tick.x1\"\n [attr.y1]=\"tick.y1\"\n [attr.x2]=\"tick.x2\"\n [attr.y2]=\"tick.y2\"\n (click)=\"selectClockTick(tick.value, $event)\"></line>\n }\n </svg>\n @for (tick of secondTicks; track tick.value) {\n <div\n class=\"clock-tick-label\"\n [class.selected]=\"isSecondSelected(tick.value)\"\n [style.left]=\"tick.labelLeft\"\n [style.top]=\"tick.labelTop\"\n (click)=\"selectClockTick(tick.value, $event)\">\n {{ tick.label }}\n </div>\n }\n }\n\n <div class=\"clock-center-dot\"></div>\n </div>\n\n <div class=\"clock-help\">\n @if (clockStep === 'hour') {\n <span>Outer ring 00-11, inner ring 12-23.</span>\n }\n @if (clockStep === 'minute') {\n <span>Click the dial. The nearest minute will be selected.</span>\n }\n @if (clockStep === 'second') {\n <span>Click the dial. The nearest second will be selected.</span>\n }\n </div>\n\n <div class=\"clock-footer\">\n <span>{{ timeSummary }}</span>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: [":host{display:block;width:100%}.datetime-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.date-field,.time-field{width:100%}.middle-actions{display:flex;align-items:center;gap:4px;justify-content:flex-start}.icon-action{flex:0 0 auto}.icon-action i{font-size:1rem;line-height:1}.time-row{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.clock-backdrop{position:fixed;inset:0;z-index:1000;background:#0000002e}.clock-dialog{position:fixed;z-index:1001;top:50%;left:50%;width:min(92vw,360px);transform:translate(-50%,-50%)}.clock-panel{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgba(0,0,0,.12);border-radius:16px;background:#fff;box-shadow:0 18px 36px #0003}.clock-panel-header,.clock-summary,.clock-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.clock-panel-title{font-size:.95rem;font-weight:600}.clock-summary{justify-content:center;font-size:1.1rem}.clock-step{min-width:52px;font-weight:600}.clock-step.active{background:#1976d21f}.clock-face{position:relative;align-self:center;width:min(100%,280px);aspect-ratio:1;border-radius:50%;overflow:hidden;background:radial-gradient(circle at center,rgba(25,118,210,.08) 0 16%,transparent 16% 100%),radial-gradient(circle at center,transparent 0 61%,rgba(25,118,210,.08) 61% 62%,transparent 62% 100%),radial-gradient(circle at center,#0000000a 0 100%)}.clock-face.clickable-face{cursor:crosshair}.clock-hand{position:absolute;top:50%;left:50%;width:2px;transform-origin:center bottom;background:#1976d2;border-radius:999px;z-index:1}.clock-hour-hand{background:#1976d2b8;width:4px}.clock-minute-hand{background:#1976d2;width:2px}.clock-hour-label{position:absolute;transform:translate(-50%,-50%);border:0;padding:0;margin:0;min-width:0;width:auto;height:auto;font-size:.72rem;line-height:1;background:transparent;box-shadow:none;color:#000000d1;cursor:pointer}.clock-hour-label.inner-ring{font-size:.68rem}.clock-hour-label.selected{color:#1976d2;font-weight:700}.clock-ticks-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.clock-tick-line{stroke:#00000057;stroke-width:1.5;stroke-linecap:round;cursor:pointer}.clock-tick-line.selected{stroke:#1976d2;stroke-width:2.5}.clock-tick-label{position:absolute;transform:translate(-50%,-50%);font-size:.68rem;line-height:1;color:#000000b8}.clock-tick-label.selected{color:#1976d2;font-weight:700}.clock-center-dot{position:absolute;top:50%;left:50%;width:12px;height:12px;border-radius:50%;transform:translate(-50%,-50%);background:#1976d2;z-index:2}.hour-face .clock-hour-label:hover,.hour-face .clock-hour-label:focus-visible{color:#1976d2;outline:none}.clock-help,.clock-footer{font-size:.78rem;color:#000000ad}@media(min-width:720px){.time-row{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:960px){.datetime-wrapper.datetime-mode{display:grid;align-items:start;gap:8px;grid-template-columns:minmax(240px,2fr) auto repeat(2,minmax(84px,96px))}.datetime-wrapper.datetime-mode.has-seconds{grid-template-columns:minmax(240px,2fr) auto repeat(3,minmax(84px,96px))}.datetime-wrapper.datetime-mode .date-field{margin-bottom:0}.datetime-wrapper.datetime-mode .middle-actions{align-self:start;padding-top:4px}.datetime-wrapper.datetime-mode .time-row{display:contents}.datetime-wrapper.datetime-mode .clock-panel{grid-column:1/-1}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1$3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatFormField$1, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel$1, 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: "component", type: MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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"] }] }); }
|
|
3571
3963
|
}
|
|
3572
3964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DatetimeComponent, decorators: [{
|
|
3573
3965
|
type: Component,
|
|
3574
|
-
args: [{ selector: 'gloww-datetime', providers: [
|
|
3966
|
+
args: [{ selector: 'gloww-datetime', standalone: true, providers: [
|
|
3575
3967
|
{
|
|
3576
3968
|
provide: NG_VALUE_ACCESSOR,
|
|
3577
3969
|
multi: true,
|
|
3578
|
-
useExisting: DatetimeComponent
|
|
3970
|
+
useExisting: forwardRef(() => DatetimeComponent)
|
|
3579
3971
|
}
|
|
3580
|
-
], imports: [MatFormField, MatLabel, MatInput, MatDatepickerInput, FormsModule, MatDatepickerToggle, MatSuffix, MatDatepicker, NgxMatDatetimePickerModule], 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]=\"true\" [disableMinute]=\"disableMinute\">\n </ngx-mat-datetime-picker>\n </mat-form-field>\n }\n</div>\n" }]
|
|
3581
|
-
}], ctorParameters: () => [
|
|
3972
|
+
], imports: [ReactiveFormsModule, MatFormField$1, MatLabel$1, MatInput, MatDatepickerInput, MatDatepickerToggle, MatDatepicker, MatSuffix, MatButton], template: "<div class=\"datetime-wrapper\" [class.datetime-mode]=\"isDateTime\" [class.has-seconds]=\"showSeconds\">\n <mat-form-field class=\"date-field\">\n @if (display) {\n <mat-label>{{ display }}</mat-label>\n }\n <input\n matInput\n [matDatepicker]=\"picker\"\n [placeholder]=\"placeHolder\"\n [formControl]=\"dateControl\"\n [disabled]=\"isDisabled\"\n (dateChange)=\"markTouched()\"\n (blur)=\"markTouched()\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n\n @if (isDateTime) {\n <div class=\"middle-actions\">\n <button\n mat-icon-button\n type=\"button\"\n class=\"icon-action\"\n [disabled]=\"isDisabled\"\n title=\"Clear date and time\"\n aria-label=\"Clear date and time\"\n (click)=\"clear()\">\n <i class=\"fal fa-eraser\"></i>\n </button>\n\n <button\n mat-icon-button\n type=\"button\"\n class=\"icon-action\"\n [disabled]=\"isDisabled\"\n title=\"Open time clock\"\n aria-label=\"Open time clock\"\n (click)=\"openClock()\">\n <i class=\"fal fa-clock\"></i>\n </button>\n </div>\n\n <div class=\"time-row\">\n <mat-form-field class=\"time-field\">\n <mat-label>HH</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"23\"\n inputmode=\"numeric\"\n [formControl]=\"hourControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('hour')\"\n (blur)=\"onTimePartBlur('hour')\">\n </mat-form-field>\n\n <mat-form-field class=\"time-field\">\n <mat-label>MM</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"59\"\n inputmode=\"numeric\"\n [formControl]=\"minuteControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('minute')\"\n (blur)=\"onTimePartBlur('minute')\">\n </mat-form-field>\n\n @if (showSeconds) {\n <mat-form-field class=\"time-field\">\n <mat-label>SS</mat-label>\n <input\n matInput\n type=\"number\"\n min=\"0\"\n max=\"59\"\n inputmode=\"numeric\"\n [formControl]=\"secondControl\"\n [disabled]=\"isDisabled\"\n (input)=\"onTimePartInput('second')\"\n (blur)=\"onTimePartBlur('second')\">\n </mat-form-field>\n }\n </div>\n\n @if (isClockOpen) {\n <div class=\"clock-backdrop\" (click)=\"closeClock()\"></div>\n\n <div class=\"clock-dialog\" (click)=\"$event.stopPropagation()\">\n <div class=\"clock-panel\">\n <div class=\"clock-panel-header\">\n <div class=\"clock-panel-title\">{{ clockTitle }}</div>\n <button\n mat-button\n type=\"button\"\n class=\"clock-close\"\n [disabled]=\"isDisabled\"\n (click)=\"closeClock()\">\n Close\n </button>\n </div>\n\n <div class=\"clock-summary\">\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'hour'\" (click)=\"goToClockStep('hour')\">\n {{ hourControl.value || '00' }}\n </button>\n <span>:</span>\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'minute'\" (click)=\"goToClockStep('minute')\">\n {{ minuteControl.value || '00' }}\n </button>\n @if (showSeconds) {\n <span>:</span>\n <button mat-button type=\"button\" class=\"clock-step\" [class.active]=\"clockStep === 'second'\" (click)=\"goToClockStep('second')\">\n {{ secondControl.value || '00' }}\n </button>\n }\n </div>\n\n <div class=\"clock-face\" [class.clickable-face]=\"clockStep !== 'hour'\" [class.hour-face]=\"clockStep === 'hour'\" (click)=\"onClockFaceClick($event)\">\n <div class=\"clock-hand clock-hour-hand\" [style.transform]=\"hourHandTransform\" [style.height]=\"hourHandHeight\"></div>\n <div class=\"clock-hand clock-minute-hand\" [style.transform]=\"minuteHandTransform\" [style.height]=\"minuteHandHeight\"></div>\n\n @if (clockStep === 'hour') {\n @for (marker of hourMarkers; track marker.value) {\n <button\n type=\"button\"\n class=\"clock-hour-label\"\n [class.selected]=\"isHourSelected(marker.value)\"\n [class.inner-ring]=\"marker.value >= 12\"\n [style.left]=\"marker.left\"\n [style.top]=\"marker.top\"\n (click)=\"selectClockHour(marker.value, $event)\">\n {{ marker.label }}\n </button>\n }\n }\n\n @if (clockStep === 'minute') {\n <svg class=\"clock-ticks-svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n @for (tick of minuteTicks; track tick.value) {\n <line\n class=\"clock-tick-line\"\n [class.selected]=\"isMinuteSelected(tick.value)\"\n [attr.x1]=\"tick.x1\"\n [attr.y1]=\"tick.y1\"\n [attr.x2]=\"tick.x2\"\n [attr.y2]=\"tick.y2\"\n (click)=\"selectClockTick(tick.value, $event)\"></line>\n }\n </svg>\n @for (tick of minuteTicks; track tick.value) {\n <div\n class=\"clock-tick-label\"\n [class.selected]=\"isMinuteSelected(tick.value)\"\n [style.left]=\"tick.labelLeft\"\n [style.top]=\"tick.labelTop\"\n (click)=\"selectClockTick(tick.value, $event)\">\n {{ tick.label }}\n </div>\n }\n }\n\n @if (clockStep === 'second') {\n <svg class=\"clock-ticks-svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n @for (tick of secondTicks; track tick.value) {\n <line\n class=\"clock-tick-line\"\n [class.selected]=\"isSecondSelected(tick.value)\"\n [attr.x1]=\"tick.x1\"\n [attr.y1]=\"tick.y1\"\n [attr.x2]=\"tick.x2\"\n [attr.y2]=\"tick.y2\"\n (click)=\"selectClockTick(tick.value, $event)\"></line>\n }\n </svg>\n @for (tick of secondTicks; track tick.value) {\n <div\n class=\"clock-tick-label\"\n [class.selected]=\"isSecondSelected(tick.value)\"\n [style.left]=\"tick.labelLeft\"\n [style.top]=\"tick.labelTop\"\n (click)=\"selectClockTick(tick.value, $event)\">\n {{ tick.label }}\n </div>\n }\n }\n\n <div class=\"clock-center-dot\"></div>\n </div>\n\n <div class=\"clock-help\">\n @if (clockStep === 'hour') {\n <span>Outer ring 00-11, inner ring 12-23.</span>\n }\n @if (clockStep === 'minute') {\n <span>Click the dial. The nearest minute will be selected.</span>\n }\n @if (clockStep === 'second') {\n <span>Click the dial. The nearest second will be selected.</span>\n }\n </div>\n\n <div class=\"clock-footer\">\n <span>{{ timeSummary }}</span>\n </div>\n </div>\n </div>\n }\n }\n</div>\n", styles: [":host{display:block;width:100%}.datetime-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.date-field,.time-field{width:100%}.middle-actions{display:flex;align-items:center;gap:4px;justify-content:flex-start}.icon-action{flex:0 0 auto}.icon-action i{font-size:1rem;line-height:1}.time-row{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}.clock-backdrop{position:fixed;inset:0;z-index:1000;background:#0000002e}.clock-dialog{position:fixed;z-index:1001;top:50%;left:50%;width:min(92vw,360px);transform:translate(-50%,-50%)}.clock-panel{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgba(0,0,0,.12);border-radius:16px;background:#fff;box-shadow:0 18px 36px #0003}.clock-panel-header,.clock-summary,.clock-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}.clock-panel-title{font-size:.95rem;font-weight:600}.clock-summary{justify-content:center;font-size:1.1rem}.clock-step{min-width:52px;font-weight:600}.clock-step.active{background:#1976d21f}.clock-face{position:relative;align-self:center;width:min(100%,280px);aspect-ratio:1;border-radius:50%;overflow:hidden;background:radial-gradient(circle at center,rgba(25,118,210,.08) 0 16%,transparent 16% 100%),radial-gradient(circle at center,transparent 0 61%,rgba(25,118,210,.08) 61% 62%,transparent 62% 100%),radial-gradient(circle at center,#0000000a 0 100%)}.clock-face.clickable-face{cursor:crosshair}.clock-hand{position:absolute;top:50%;left:50%;width:2px;transform-origin:center bottom;background:#1976d2;border-radius:999px;z-index:1}.clock-hour-hand{background:#1976d2b8;width:4px}.clock-minute-hand{background:#1976d2;width:2px}.clock-hour-label{position:absolute;transform:translate(-50%,-50%);border:0;padding:0;margin:0;min-width:0;width:auto;height:auto;font-size:.72rem;line-height:1;background:transparent;box-shadow:none;color:#000000d1;cursor:pointer}.clock-hour-label.inner-ring{font-size:.68rem}.clock-hour-label.selected{color:#1976d2;font-weight:700}.clock-ticks-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.clock-tick-line{stroke:#00000057;stroke-width:1.5;stroke-linecap:round;cursor:pointer}.clock-tick-line.selected{stroke:#1976d2;stroke-width:2.5}.clock-tick-label{position:absolute;transform:translate(-50%,-50%);font-size:.68rem;line-height:1;color:#000000b8}.clock-tick-label.selected{color:#1976d2;font-weight:700}.clock-center-dot{position:absolute;top:50%;left:50%;width:12px;height:12px;border-radius:50%;transform:translate(-50%,-50%);background:#1976d2;z-index:2}.hour-face .clock-hour-label:hover,.hour-face .clock-hour-label:focus-visible{color:#1976d2;outline:none}.clock-help,.clock-footer{font-size:.78rem;color:#000000ad}@media(min-width:720px){.time-row{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:960px){.datetime-wrapper.datetime-mode{display:grid;align-items:start;gap:8px;grid-template-columns:minmax(240px,2fr) auto repeat(2,minmax(84px,96px))}.datetime-wrapper.datetime-mode.has-seconds{grid-template-columns:minmax(240px,2fr) auto repeat(3,minmax(84px,96px))}.datetime-wrapper.datetime-mode .date-field{margin-bottom:0}.datetime-wrapper.datetime-mode .middle-actions{align-self:start;padding-top:4px}.datetime-wrapper.datetime-mode .time-row{display:contents}.datetime-wrapper.datetime-mode .clock-panel{grid-column:1/-1}}\n"] }]
|
|
3973
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3974
|
+
type: Optional
|
|
3975
|
+
}, {
|
|
3976
|
+
type: Inject,
|
|
3977
|
+
args: [MAT_DATE_LOCALE]
|
|
3978
|
+
}] }], propDecorators: { _value: [{
|
|
3582
3979
|
type: Input,
|
|
3583
3980
|
args: ['value']
|
|
3584
3981
|
}], display: [{
|
|
@@ -3590,14 +3987,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3590
3987
|
}], mode: [{
|
|
3591
3988
|
type: Input,
|
|
3592
3989
|
args: ['mode']
|
|
3593
|
-
}], showSpinners: [{
|
|
3594
|
-
type: Input
|
|
3595
3990
|
}], showSeconds: [{
|
|
3596
3991
|
type: Input
|
|
3597
|
-
}], disableMinute: [{
|
|
3598
|
-
type: Input
|
|
3599
3992
|
}] } });
|
|
3600
3993
|
|
|
3994
|
+
class CallbackDirective {
|
|
3995
|
+
constructor() { }
|
|
3996
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CallbackDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3997
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: CallbackDirective, isStandalone: true, selector: "[glowwCallback]", ngImport: i0 }); }
|
|
3998
|
+
}
|
|
3999
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CallbackDirective, decorators: [{
|
|
4000
|
+
type: Directive,
|
|
4001
|
+
args: [{
|
|
4002
|
+
selector: '[glowwCallback]',
|
|
4003
|
+
standalone: true
|
|
4004
|
+
}]
|
|
4005
|
+
}], ctorParameters: () => [] });
|
|
4006
|
+
|
|
4007
|
+
class GlowwMatPaginatorIntlService extends MatPaginatorIntl {
|
|
4008
|
+
constructor(i18n) {
|
|
4009
|
+
super();
|
|
4010
|
+
this.i18n = i18n;
|
|
4011
|
+
this.getRangeLabel = (page, pageSize, length) => {
|
|
4012
|
+
if (length === 0 || pageSize === 0) {
|
|
4013
|
+
return `0 ${this.i18n.instant('PAGINATOR.OF', 'of')} ${length}`;
|
|
4014
|
+
}
|
|
4015
|
+
const startIndex = page * pageSize;
|
|
4016
|
+
const endIndex = Math.min(startIndex + pageSize, length);
|
|
4017
|
+
return `${startIndex + 1}-${endIndex} ${this.i18n.instant('PAGINATOR.OF', 'of')} ${length}`;
|
|
4018
|
+
};
|
|
4019
|
+
this.subscription = this.i18n.langChanges$.subscribe(() => this.translateLabels());
|
|
4020
|
+
this.translateLabels();
|
|
4021
|
+
}
|
|
4022
|
+
ngOnDestroy() {
|
|
4023
|
+
this.subscription.unsubscribe();
|
|
4024
|
+
}
|
|
4025
|
+
translateLabels() {
|
|
4026
|
+
this.itemsPerPageLabel = this.i18n.instant('PAGINATOR.ITEMS_PER_PAGE', 'Items per page');
|
|
4027
|
+
this.nextPageLabel = this.i18n.instant('PAGINATOR.NEXT_PAGE', 'Next page');
|
|
4028
|
+
this.previousPageLabel = this.i18n.instant('PAGINATOR.PREVIOUS_PAGE', 'Previous page');
|
|
4029
|
+
this.firstPageLabel = this.i18n.instant('PAGINATOR.FIRST_PAGE', 'First page');
|
|
4030
|
+
this.lastPageLabel = this.i18n.instant('PAGINATOR.LAST_PAGE', 'Last page');
|
|
4031
|
+
this.changes.next();
|
|
4032
|
+
}
|
|
4033
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService, deps: [{ token: GlowwI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4034
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService }); }
|
|
4035
|
+
}
|
|
4036
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwMatPaginatorIntlService, decorators: [{
|
|
4037
|
+
type: Injectable
|
|
4038
|
+
}], ctorParameters: () => [{ type: GlowwI18nService }] });
|
|
4039
|
+
|
|
3601
4040
|
class BaseCollectionComponent {
|
|
3602
4041
|
constructor(_formBuilder) {
|
|
3603
4042
|
this._formBuilder = _formBuilder;
|
|
@@ -3639,26 +4078,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3639
4078
|
type: Injectable
|
|
3640
4079
|
}] });
|
|
3641
4080
|
|
|
4081
|
+
const GLOWW_STANDALONE_DECLARATIONS = [
|
|
4082
|
+
UploadDocComponent,
|
|
4083
|
+
SafeHtmlPipe,
|
|
4084
|
+
DisplayObjectsComponent,
|
|
4085
|
+
HeaderComponent,
|
|
4086
|
+
ResultTableComponent,
|
|
4087
|
+
SearchFormComponent,
|
|
4088
|
+
ConfirmationComponent,
|
|
4089
|
+
PromptComponent,
|
|
4090
|
+
SecurePipe,
|
|
4091
|
+
SecureImgComponent,
|
|
4092
|
+
MenuListItemComponent,
|
|
4093
|
+
CodeEditorComponent,
|
|
4094
|
+
HtmlEditorComponent,
|
|
4095
|
+
HtmlFormatPipe,
|
|
4096
|
+
UploadFileComponent,
|
|
4097
|
+
FileSinkDirective,
|
|
4098
|
+
FileEditComponent,
|
|
4099
|
+
FoldersComponent,
|
|
4100
|
+
DownloadProgressComponent,
|
|
4101
|
+
SecureAComponent,
|
|
4102
|
+
DummyComponent,
|
|
4103
|
+
SelectComponent,
|
|
4104
|
+
AutoCompleteComponent,
|
|
4105
|
+
DatetimeComponent,
|
|
4106
|
+
RouteDirective,
|
|
4107
|
+
CallbackDirective,
|
|
4108
|
+
FilterFormComponent
|
|
4109
|
+
];
|
|
4110
|
+
const GLOWW_MODULE_EXPORTS = [
|
|
4111
|
+
...GLOWW_STANDALONE_DECLARATIONS,
|
|
4112
|
+
MatDatepickerModule,
|
|
4113
|
+
NgxMatDatetimePickerModule,
|
|
4114
|
+
NgxMatTimepickerComponent,
|
|
4115
|
+
NgxMatNativeDateModule
|
|
4116
|
+
];
|
|
4117
|
+
function getGlowwProviders(folderServiceConfig) {
|
|
4118
|
+
return [
|
|
4119
|
+
VersionCheckService,
|
|
4120
|
+
NavService,
|
|
4121
|
+
VoiceRecognitionService,
|
|
4122
|
+
{
|
|
4123
|
+
provide: FolderServiceConfig,
|
|
4124
|
+
useValue: folderServiceConfig
|
|
4125
|
+
},
|
|
4126
|
+
{ provide: MAT_DATE_LOCALE, useValue: 'fr' }
|
|
4127
|
+
];
|
|
4128
|
+
}
|
|
4129
|
+
function provideGloww(folderServiceConfig) {
|
|
4130
|
+
return makeEnvironmentProviders(getGlowwProviders(folderServiceConfig));
|
|
4131
|
+
}
|
|
3642
4132
|
class GlowwModule {
|
|
3643
4133
|
static forRoot(folderServiceConfig) {
|
|
3644
4134
|
console.log(`forRoot ${folderServiceConfig}`);
|
|
3645
4135
|
return {
|
|
3646
4136
|
ngModule: GlowwModule,
|
|
3647
|
-
providers:
|
|
3648
|
-
VersionCheckService,
|
|
3649
|
-
NavService,
|
|
3650
|
-
VoiceRecognitionService,
|
|
3651
|
-
{
|
|
3652
|
-
provide: FolderServiceConfig,
|
|
3653
|
-
useValue: folderServiceConfig
|
|
3654
|
-
},
|
|
3655
|
-
{ provide: MAT_DATE_LOCALE, useValue: 'fr' }
|
|
3656
|
-
]
|
|
4137
|
+
providers: getGlowwProviders(folderServiceConfig)
|
|
3657
4138
|
};
|
|
3658
4139
|
}
|
|
3659
4140
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3660
4141
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: GlowwModule, imports: [CommonModule,
|
|
3661
|
-
BrowserModule,
|
|
3662
4142
|
RouterModule,
|
|
3663
4143
|
FormsModule,
|
|
3664
4144
|
ReactiveFormsModule,
|
|
@@ -3683,8 +4163,7 @@ class GlowwModule {
|
|
|
3683
4163
|
NgxMatNativeDateModule, // Existe selon ta liste
|
|
3684
4164
|
//NgxMatMomentModule,
|
|
3685
4165
|
DragDropModule,
|
|
3686
|
-
AngularResizeEventModule,
|
|
3687
|
-
UploadDocComponent,
|
|
4166
|
+
AngularResizeEventModule, UploadDocComponent,
|
|
3688
4167
|
SafeHtmlPipe,
|
|
3689
4168
|
DisplayObjectsComponent,
|
|
3690
4169
|
HeaderComponent,
|
|
@@ -3709,9 +4188,9 @@ class GlowwModule {
|
|
|
3709
4188
|
AutoCompleteComponent,
|
|
3710
4189
|
DatetimeComponent,
|
|
3711
4190
|
RouteDirective,
|
|
3712
|
-
|
|
3713
|
-
UploadDocComponent,
|
|
3714
|
-
|
|
4191
|
+
CallbackDirective,
|
|
4192
|
+
FilterFormComponent], exports: [UploadDocComponent,
|
|
4193
|
+
SafeHtmlPipe,
|
|
3715
4194
|
DisplayObjectsComponent,
|
|
3716
4195
|
HeaderComponent,
|
|
3717
4196
|
ResultTableComponent,
|
|
@@ -3724,6 +4203,9 @@ class GlowwModule {
|
|
|
3724
4203
|
CodeEditorComponent,
|
|
3725
4204
|
HtmlEditorComponent,
|
|
3726
4205
|
HtmlFormatPipe,
|
|
4206
|
+
UploadFileComponent,
|
|
4207
|
+
FileSinkDirective,
|
|
4208
|
+
FileEditComponent,
|
|
3727
4209
|
FoldersComponent,
|
|
3728
4210
|
DownloadProgressComponent,
|
|
3729
4211
|
SecureAComponent,
|
|
@@ -3731,14 +4213,13 @@ class GlowwModule {
|
|
|
3731
4213
|
SelectComponent,
|
|
3732
4214
|
AutoCompleteComponent,
|
|
3733
4215
|
DatetimeComponent,
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwModule, imports: [CommonModule,
|
|
3741
|
-
BrowserModule,
|
|
4216
|
+
RouteDirective,
|
|
4217
|
+
CallbackDirective,
|
|
4218
|
+
FilterFormComponent, MatDatepickerModule,
|
|
4219
|
+
NgxMatDatetimePickerModule,
|
|
4220
|
+
NgxMatTimepickerComponent,
|
|
4221
|
+
NgxMatNativeDateModule] }); }
|
|
4222
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwModule, providers: [{ provide: MatPaginatorIntl, useClass: GlowwMatPaginatorIntlService }], imports: [CommonModule,
|
|
3742
4223
|
RouterModule,
|
|
3743
4224
|
FormsModule,
|
|
3744
4225
|
ReactiveFormsModule,
|
|
@@ -3763,8 +4244,7 @@ class GlowwModule {
|
|
|
3763
4244
|
NgxMatNativeDateModule, // Existe selon ta liste
|
|
3764
4245
|
//NgxMatMomentModule,
|
|
3765
4246
|
DragDropModule,
|
|
3766
|
-
AngularResizeEventModule,
|
|
3767
|
-
UploadDocComponent,
|
|
4247
|
+
AngularResizeEventModule, UploadDocComponent,
|
|
3768
4248
|
DisplayObjectsComponent,
|
|
3769
4249
|
ConfirmationComponent,
|
|
3770
4250
|
PromptComponent,
|
|
@@ -3779,7 +4259,7 @@ class GlowwModule {
|
|
|
3779
4259
|
AutoCompleteComponent,
|
|
3780
4260
|
DatetimeComponent,
|
|
3781
4261
|
FilterFormComponent, MatDatepickerModule,
|
|
3782
|
-
NgxMatDatetimePickerModule,
|
|
4262
|
+
NgxMatDatetimePickerModule,
|
|
3783
4263
|
NgxMatNativeDateModule] }); }
|
|
3784
4264
|
}
|
|
3785
4265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: GlowwModule, decorators: [{
|
|
@@ -3787,7 +4267,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3787
4267
|
args: [{
|
|
3788
4268
|
imports: [
|
|
3789
4269
|
CommonModule,
|
|
3790
|
-
BrowserModule,
|
|
3791
4270
|
RouterModule,
|
|
3792
4271
|
FormsModule,
|
|
3793
4272
|
ReactiveFormsModule,
|
|
@@ -3813,64 +4292,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
3813
4292
|
//NgxMatMomentModule,
|
|
3814
4293
|
DragDropModule,
|
|
3815
4294
|
AngularResizeEventModule,
|
|
3816
|
-
|
|
3817
|
-
SafeHtmlPipe,
|
|
3818
|
-
DisplayObjectsComponent,
|
|
3819
|
-
HeaderComponent,
|
|
3820
|
-
ResultTableComponent,
|
|
3821
|
-
SearchFormComponent,
|
|
3822
|
-
ConfirmationComponent,
|
|
3823
|
-
PromptComponent,
|
|
3824
|
-
SecurePipe,
|
|
3825
|
-
SecureImgComponent,
|
|
3826
|
-
MenuListItemComponent,
|
|
3827
|
-
CodeEditorComponent,
|
|
3828
|
-
HtmlEditorComponent,
|
|
3829
|
-
HtmlFormatPipe,
|
|
3830
|
-
UploadFileComponent,
|
|
3831
|
-
FileSinkDirective,
|
|
3832
|
-
FileEditComponent,
|
|
3833
|
-
FoldersComponent,
|
|
3834
|
-
DownloadProgressComponent,
|
|
3835
|
-
SecureAComponent,
|
|
3836
|
-
DummyComponent,
|
|
3837
|
-
SelectComponent,
|
|
3838
|
-
AutoCompleteComponent,
|
|
3839
|
-
DatetimeComponent,
|
|
3840
|
-
RouteDirective,
|
|
3841
|
-
FilterFormComponent
|
|
4295
|
+
...GLOWW_STANDALONE_DECLARATIONS
|
|
3842
4296
|
],
|
|
3843
|
-
providers: [],
|
|
3844
|
-
exports: [
|
|
3845
|
-
SafeHtmlPipe,
|
|
3846
|
-
UploadDocComponent,
|
|
3847
|
-
UploadFileComponent,
|
|
3848
|
-
DisplayObjectsComponent,
|
|
3849
|
-
HeaderComponent,
|
|
3850
|
-
ResultTableComponent,
|
|
3851
|
-
SearchFormComponent,
|
|
3852
|
-
ConfirmationComponent,
|
|
3853
|
-
PromptComponent,
|
|
3854
|
-
SecurePipe,
|
|
3855
|
-
SecureImgComponent,
|
|
3856
|
-
MenuListItemComponent,
|
|
3857
|
-
CodeEditorComponent,
|
|
3858
|
-
HtmlEditorComponent,
|
|
3859
|
-
HtmlFormatPipe,
|
|
3860
|
-
FoldersComponent,
|
|
3861
|
-
DownloadProgressComponent,
|
|
3862
|
-
SecureAComponent,
|
|
3863
|
-
DummyComponent,
|
|
3864
|
-
SelectComponent,
|
|
3865
|
-
AutoCompleteComponent,
|
|
3866
|
-
DatetimeComponent,
|
|
3867
|
-
MatDatepickerModule,
|
|
3868
|
-
NgxMatDatetimePickerModule, // Existe selon ta liste
|
|
3869
|
-
NgxMatTimepickerComponent, // Attention : ta liste dit "NgxMatTimepickerComponent"
|
|
3870
|
-
NgxMatNativeDateModule, // Existe selon ta liste
|
|
3871
|
-
//NgxMatMomentModule,
|
|
3872
|
-
FilterFormComponent
|
|
3873
|
-
]
|
|
4297
|
+
providers: [{ provide: MatPaginatorIntl, useClass: GlowwMatPaginatorIntlService }],
|
|
4298
|
+
exports: [...GLOWW_MODULE_EXPORTS]
|
|
3874
4299
|
}]
|
|
3875
4300
|
}] });
|
|
3876
4301
|
|
|
@@ -4010,5 +4435,5 @@ class GlowwValidators {
|
|
|
4010
4435
|
* Generated bundle index. Do not edit.
|
|
4011
4436
|
*/
|
|
4012
4437
|
|
|
4013
|
-
export { API_SERVER_URL, AdministratorGuard, AuthGuard, AuthenticationService, AuthenticationServiceConfig, AutoCompleteComponent, BaseCollectionComponent, ChangePasswordDlgComponent, CodeEditorComponent, ConfirmationComponent, ConfirmationModel, DatetimeComponent, DialogService, DisplayObjectsComponent, DownloadProgressComponent, DummyComponent, ErrorInterceptor, FilterFormComponent, FolderService, FolderServiceConfig, FoldersComponent, GLOWW_APPLI, GlowwModule, GlowwSecurityModule, GlowwSecurityService, GlowwService, GlowwValidators, HasUnsavedDataGuard, HeaderComponent, HtmlEditorComponent, HtmlFormatPipe, JwtInterceptor, LoginComponent, MenuListItemComponent, NavService, PromptComponent, PromptModel, ResultTableComponent, SafeHtmlPipe, SearchFormComponent, SecureAComponent, SecureImgComponent, SecurePipe, SelectComponent, StagingInterceptor, UploadDocComponent, UploadFileComponent, UserMenuComponent, VersionCheckService, VoiceRecognitionService };
|
|
4438
|
+
export { API_SERVER_URL, AdministratorGuard, AuthGuard, AuthenticationService, AuthenticationServiceConfig, AutoCompleteComponent, BaseCollectionComponent, CallbackDirective, ChangePasswordDlgComponent, CodeEditorComponent, ConfirmationComponent, ConfirmationModel, DatetimeComponent, DialogService, DisplayObjectsComponent, DownloadProgressComponent, DummyComponent, ErrorInterceptor, FileEditComponent, FileSinkDirective, FilterFormComponent, FolderService, FolderServiceConfig, FoldersComponent, GLOWW_APPLI, GLOWW_MODULE_EXPORTS, GLOWW_SECURITY_STANDALONE_DECLARATIONS, GLOWW_STANDALONE_DECLARATIONS, GlowwModule, GlowwSecurityModule, GlowwSecurityService, GlowwService, GlowwValidators, HasUnsavedDataGuard, HeaderComponent, HtmlEditorComponent, HtmlFormatPipe, JwtInterceptor, LoginComponent, MenuListItemComponent, NavService, PromptComponent, PromptModel, ResultTableComponent, RouteDirective, SafeHtmlPipe, SearchFormComponent, SecureAComponent, SecureImgComponent, SecurePipe, SelectComponent, SocialNetworkComponent, SocialNetworkDlgComponent, StagingInterceptor, UploadDocComponent, UploadFileComponent, UserMenuComponent, VersionCheckService, VoiceRecognitionService, provideGloww, provideGlowwSecurity };
|
|
4014
4439
|
//# sourceMappingURL=gloww-gloww.mjs.map
|