@gipisistemas/ng-core 1.1.10 → 1.1.12
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/styles/colors.scss +228 -211
- package/assets/styles/styles.scss +50 -5
- package/bundles/gipisistemas-ng-core.umd.js +3497 -146
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -1
- package/bundles/gipisistemas-ng-core.umd.min.js +9 -9
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -1
- package/core/gipi-components/components/abstract-crud.component.d.ts +2 -2
- package/core/gipi-components/components/abstract-find.component.d.ts +5 -4
- package/core/gipi-components/components/abstract.component.d.ts +1 -0
- package/esm2015/core/components/abstract-find.component.js +4 -1
- package/esm2015/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm2015/core/gipi-components/components/abstract-find.component.js +45 -21
- package/esm2015/core/gipi-components/components/abstract.component.js +5 -2
- package/esm2015/gipi-components.js +19 -6
- package/esm2015/gipisistemas-ng-core.js +3 -1
- package/esm2015/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +1 -1
- package/esm2015/shared/gipi-components/datepicker/datepicker/datepicker.component.js +3 -3
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +1 -1
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +1 -1
- package/esm2015/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.js +158 -0
- package/esm2015/shared/gipi-components/datetime-picker/datetime-picker.module.js +82 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.js +116 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.js +676 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.js +306 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.js +30 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.js +7 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.js +7 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.js +346 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.js +83 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.js +1 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.js +451 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.js +151 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.js +230 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.js +43 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.js +139 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.js +3 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.js +138 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.js +20 -0
- package/esm2015/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.js +141 -0
- package/esm2015/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +1 -1
- package/esm2015/shared/gipi-components/form-field/form-field.component.js +1 -1
- package/esm2015/shared/gipi-components/input-currency/input-currency.component.js +1 -1
- package/esm2015/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +1 -1
- package/esm2015/shared/gipi-components/input-select/input-select.component.js +1 -1
- package/esm2015/shared/gipi-components/month-year-picker/month-year-picker.component.js +1 -1
- package/esm2015/shared/gipi-components/radio-group/radio-group.component.js +1 -1
- package/esm2015/shared/gipi-components/range-page/range-page.component.js +1 -1
- package/esm2015/shared/gipi-components/range-slider/range-slider.component.js +1 -1
- package/esm2015/shared/gipi-components/select-button/select-button.component.js +1 -1
- package/esm2015/shared/gipi-components/textarea/textarea.component.js +1 -1
- package/esm2015/shared/shared.module.js +51 -3
- package/esm5/core/components/abstract-find.component.js +4 -1
- package/esm5/core/gipi-components/components/abstract-crud.component.js +5 -5
- package/esm5/core/gipi-components/components/abstract-find.component.js +45 -21
- package/esm5/core/gipi-components/components/abstract.component.js +5 -2
- package/esm5/gipi-components.js +19 -6
- package/esm5/gipisistemas-ng-core.js +3 -1
- package/esm5/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +1 -1
- package/esm5/shared/gipi-components/datepicker/datepicker/datepicker.component.js +3 -3
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +1 -1
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +1 -1
- package/esm5/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.js +176 -0
- package/esm5/shared/gipi-components/datetime-picker/datetime-picker.module.js +85 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.js +119 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.js +747 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.js +332 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.js +30 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.js +7 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.js +7 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.js +377 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.js +89 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.js +1 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.js +495 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.js +160 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.js +248 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.js +49 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.js +145 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.js +3 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.js +141 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.js +20 -0
- package/esm5/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.js +151 -0
- package/esm5/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +1 -1
- package/esm5/shared/gipi-components/form-field/form-field.component.js +1 -1
- package/esm5/shared/gipi-components/input-currency/input-currency.component.js +1 -1
- package/esm5/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +1 -1
- package/esm5/shared/gipi-components/input-select/input-select.component.js +1 -1
- package/esm5/shared/gipi-components/month-year-picker/month-year-picker.component.js +1 -1
- package/esm5/shared/gipi-components/radio-group/radio-group.component.js +1 -1
- package/esm5/shared/gipi-components/range-page/range-page.component.js +1 -1
- package/esm5/shared/gipi-components/range-slider/range-slider.component.js +1 -1
- package/esm5/shared/gipi-components/select-button/select-button.component.js +1 -1
- package/esm5/shared/gipi-components/textarea/textarea.component.js +1 -1
- package/esm5/shared/shared.module.js +51 -3
- package/fesm2015/gipisistemas-ng-core.js +3264 -191
- package/fesm2015/gipisistemas-ng-core.js.map +1 -1
- package/fesm5/gipisistemas-ng-core.js +3475 -152
- package/fesm5/gipisistemas-ng-core.js.map +1 -1
- package/gipi-components.d.ts +16 -0
- package/gipisistemas-ng-core.d.ts +2 -0
- package/gipisistemas-ng-core.metadata.json +1 -1
- package/package.json +4 -4
- package/shared/gipi-components/datetime-picker/datetime-picker/datetime-picker.component.d.ts +40 -0
- package/shared/gipi-components/datetime-picker/datetime-picker.module.d.ts +2 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar-body.d.ts +50 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/calendar.d.ts +140 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/clock.d.ts +66 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-animations.d.ts +8 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-errors.d.ts +2 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-filtertype.d.ts +5 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-input.d.ts +98 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-toggle.d.ts +20 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker-type.d.ts +1 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/datetimepicker.d.ts +133 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/month-view.d.ts +53 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/multi-year-view.d.ts +80 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/adapter.module.d.ts +4 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-adapter.d.ts +46 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/datetime-formats.d.ts +20 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-adapter.d.ts +36 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/shared/adapter/native-datetime-formats.d.ts +2 -0
- package/shared/gipi-components/datetime-picker/mat-datetime-picker/year-view.d.ts +52 -0
@@ -27,7 +27,7 @@ import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
27
27
|
import { MatCardModule } from '@angular/material/card';
|
28
28
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
29
29
|
import { MatChipsModule } from '@angular/material/chips';
|
30
|
-
import { MatRippleModule, MAT_DATE_FORMATS as MAT_DATE_FORMATS$1, ErrorStateMatcher, mixinErrorState, mixinColor } from '@angular/material/core';
|
30
|
+
import { MatRippleModule, MAT_DATE_FORMATS as MAT_DATE_FORMATS$1, ErrorStateMatcher, mixinErrorState, mixinColor, DateAdapter as DateAdapter$1, MAT_DATE_LOCALE as MAT_DATE_LOCALE$1, NativeDateModule, MatNativeDateModule as MatNativeDateModule$1 } from '@angular/material/core';
|
31
31
|
import { MatDialogModule, MatDialog as MatDialog$1 } from '@angular/material/dialog';
|
32
32
|
import { MatDividerModule } from '@angular/material/divider';
|
33
33
|
import { MatExpansionModule } from '@angular/material/expansion';
|
@@ -55,10 +55,10 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|
55
55
|
import { MatTreeModule } from '@angular/material/tree';
|
56
56
|
import rfdc_ from 'rfdc';
|
57
57
|
import { HttpHeaders, HttpParams, HttpClient, HttpErrorResponse, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
58
|
-
import { Subject, throwError, BehaviorSubject, of, combineLatest, fromEvent, ReplaySubject, Subscription, merge } from 'rxjs';
|
59
|
-
import { debounceTime, map, distinctUntilChanged, switchMap, startWith, delay, takeUntil, take, tap, filter, auditTime, finalize, shareReplay, catchError } from 'rxjs/operators';
|
58
|
+
import { Subject, throwError, BehaviorSubject, of, combineLatest, fromEvent, ReplaySubject, Subscription, merge, asyncScheduler } from 'rxjs';
|
59
|
+
import { debounceTime, map, distinctUntilChanged, switchMap, startWith, delay, takeUntil, take, tap, filter, auditTime, finalize, shareReplay, first, catchError } from 'rxjs/operators';
|
60
60
|
import { parsePhoneNumberFromString, getExampleNumber } from 'libphonenumber-js';
|
61
|
-
import { trigger, state, style, transition, animate, animation, useAnimation } from '@angular/animations';
|
61
|
+
import { trigger, state, style, transition, animate, animation, useAnimation, keyframes } from '@angular/animations';
|
62
62
|
import { A, Z, ZERO, NINE, SPACE, HOME, END, ENTER, ESCAPE, UP_ARROW, DOWN_ARROW, PAGE_DOWN, PAGE_UP, RIGHT_ARROW, LEFT_ARROW, BACKSPACE } from '@angular/cdk/keycodes';
|
63
63
|
import { coerceCssPixelValue, coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
64
64
|
import { MediaMatcher, BreakpointObserver } from '@angular/cdk/layout';
|
@@ -66,7 +66,7 @@ import { Platform as Platform$1, PlatformModule } from '@angular/cdk/platform';
|
|
66
66
|
import { Directionality } from '@angular/cdk/bidi';
|
67
67
|
import { OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
68
68
|
import * as moment_ from 'moment';
|
69
|
-
import { matDatepickerAnimations as matDatepickerAnimations$1 } from '@angular/material/datepicker';
|
69
|
+
import { MatDatepickerIntl as MatDatepickerIntl$1, MAT_DATEPICKER_SCROLL_STRATEGY as MAT_DATEPICKER_SCROLL_STRATEGY$1, MatDatepickerModule, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER as MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER$1, matDatepickerAnimations as matDatepickerAnimations$1 } from '@angular/material/datepicker';
|
70
70
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
71
71
|
import { DomSanitizer } from '@angular/platform-browser';
|
72
72
|
import { onlyNumbers, isValidIE, isValidCEP } from '@brazilian-utils/brazilian-utils';
|
@@ -82,15 +82,6 @@ const DEFAULT_MESSAGES = {
|
|
82
82
|
NOT_PERMISSION: 'Infelizmente, esta ação não é permitida para o seu perfil',
|
83
83
|
};
|
84
84
|
|
85
|
-
/**
|
86
|
-
* @license
|
87
|
-
* Copyright Google LLC All Rights Reserved.
|
88
|
-
*
|
89
|
-
* Use of this source code is governed by an MIT-style license that can be
|
90
|
-
* found in the LICENSE file at https://angular.io/license
|
91
|
-
*/
|
92
|
-
const MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');
|
93
|
-
|
94
85
|
const MODULES = [
|
95
86
|
A11yModule,
|
96
87
|
CdkPopoverEditModule,
|
@@ -148,6 +139,17 @@ MaterialModule = __decorate([
|
|
148
139
|
})
|
149
140
|
], MaterialModule);
|
150
141
|
|
142
|
+
/**
|
143
|
+
* @license
|
144
|
+
* Copyright Google LLC All Rights Reserved.
|
145
|
+
*
|
146
|
+
* Use of this source code is governed by an MIT-style license that can be
|
147
|
+
* found in the LICENSE file at https://angular.io/license
|
148
|
+
*/
|
149
|
+
const MAT_DATE_FORMATS = new InjectionToken('mat-date-formats');
|
150
|
+
|
151
|
+
const GIPI_DATETIME_FORMATS = new InjectionToken('mat-datetime-formats');
|
152
|
+
|
151
153
|
let ButtonComponent = class ButtonComponent {
|
152
154
|
constructor() {
|
153
155
|
this.color = 'primary';
|
@@ -9291,7 +9293,7 @@ GIPIDropdownMenuComponent = GIPIDropdownMenuComponent_1 = __decorate([
|
|
9291
9293
|
'class': 'gipi-dropdown-menu',
|
9292
9294
|
},
|
9293
9295
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
9294
|
-
styles: [".dropdown-menu-container{display:flex;flex-direction:column;gap:1rem;width:100%}.dropdown-menu-container .dropdown-menu-label{color:#131313;font-size:1.4rem;line-height:100%}.dropdown-menu-container .dropdown-menu-label>span{color:#d14014;font-size:inherit;line-height:inherit}.dropdown-menu-container .dropdown-menu-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;gap:1rem;width:100%;max-height:4rem;border-radius:5px;cursor:pointer;background-color:#fff;border:1px solid
|
9296
|
+
styles: [".dropdown-menu-container{display:flex;flex-direction:column;gap:1rem;width:100%}.dropdown-menu-container .dropdown-menu-label{color:#131313;font-size:1.4rem;line-height:100%}.dropdown-menu-container .dropdown-menu-label>span{color:#d14014;font-size:inherit;line-height:inherit}.dropdown-menu-container .dropdown-menu-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;gap:1rem;width:100%;max-height:4rem;border-radius:5px;cursor:pointer;background-color:#fff;border:1px solid #0000001f;color:#696969;transition:.2s}.dropdown-menu-container .dropdown-menu-content:focus-within,.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:active),.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:focus){box-shadow:0 0 0 .2rem #f0f0f0}.dropdown-menu-container .dropdown-menu-content:focus-within,.dropdown-menu-container .dropdown-menu-content:hover{border-color:#bfbfbf!important;background-color:#f5f5f5}.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:disabled){background-color:#e0e1e2!important;border-color:#e0e1e2!important;color:#d1d2d4!important;box-shadow:none!important;cursor:not-allowed!important;pointer-events:none!important}.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:disabled) .dropdown-menu-input,.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:disabled) .dropdown-menu-suffix .dropdown-menu-button{cursor:not-allowed!important;pointer-events:none!important}.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:disabled) .dropdown-menu-suffix .dropdown-menu-trigger{border-color:#e0e1e2!important;pointer-events:none!important}.dropdown-menu-container .dropdown-menu-content:has(.dropdown-menu-input:disabled) mat-icon{color:#d1d2d4!important;fill:#d1d2d4!important;cursor:not-allowed!important;pointer-events:none!important}.dropdown-menu-container .dropdown-menu-content .dropdown-menu-input{cursor:pointer;height:16px;outline:0;border:none;background-color:transparent;color:inherit;flex:1;max-width:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-menu-container .dropdown-menu-content .dropdown-menu-suffix{display:flex;flex-direction:row;align-items:center;gap:16px}.dropdown-menu-container .dropdown-menu-content .dropdown-menu-suffix .dropdown-menu-trigger{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;border-radius:40px;border:1px solid transparent;color:#131313;background-color:#f0f0f0;font-size:1.2rem;line-height:1.4rem}.dropdown-menu-container .dropdown-menu-content .dropdown-menu-suffix .dropdown-menu-button{display:flex;align-items:center;justify-content:center;outline:0;border:none;cursor:pointer;background-color:transparent}.dropdown-menu-container .dropdown-menu-content .dropdown-menu-suffix .dropdown-menu-button:hover:not(:disabled)>mat-icon{transform:scale(1.08)}.dropdown-menu-icon{width:1.6rem;height:1.6rem;font-size:1.6rem;color:#131313;fill:#131313}.btn-popover-content{background-color:#fff;border-radius:4px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);padding:8px}"]
|
9295
9297
|
}),
|
9296
9298
|
__metadata("design:paramtypes", [ChangeDetectorRef,
|
9297
9299
|
ElementRef])
|
@@ -9952,7 +9954,7 @@ GIPIFormFieldComponent = GIPIFormFieldComponent_1 = __decorate([
|
|
9952
9954
|
'class': 'gipi-form-field',
|
9953
9955
|
},
|
9954
9956
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
9955
|
-
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.form-field-container{display:flex;flex-direction:column;gap:1rem;width:100%}.form-field-container .form-field-label{color:#131313;font-size:1.4rem;line-height:100%}.form-field-container .form-field-label>span{color:#d14014;font-size:inherit;line-height:inherit}.form-field-container .form-field-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1.2rem;gap:1rem;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid
|
9957
|
+
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.form-field-container{display:flex;flex-direction:column;gap:1rem;width:100%}.form-field-container .form-field-label{color:#131313;font-size:1.4rem;line-height:100%}.form-field-container .form-field-label>span{color:#d14014;font-size:inherit;line-height:inherit}.form-field-container .form-field-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1.2rem;gap:1rem;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid #0000001f;color:#696969;caret-color:#9a9da2;transition:.2s}.form-field-container .form-field-content:focus-within,.form-field-container .form-field-content:has(.form-field-input:active),.form-field-container .form-field-content:has(.form-field-input:focus){box-shadow:0 0 0 .2rem #f0f0f0}.form-field-container .form-field-content:focus-within,.form-field-container .form-field-content:hover{border-color:#bfbfbf!important}.form-field-container .form-field-content:has(.form-field-input:invalid){border-color:#d14014!important;color:#d14014!important;caret-color:#d14014!important}.form-field-container .form-field-content:has(.form-field-input:invalid):focus-within{box-shadow:0 0 0 .2rem #f1c4b6!important}.form-field-container .form-field-content:has(.form-field-input:disabled){border-color:#e0e1e2!important;color:#d1d2d4!important;box-shadow:none!important;cursor:not-allowed!important;caret-color:#d1d2d4!important;pointer-events:none!important}.form-field-container .form-field-content:has(.form-field-input:disabled) .form-field-input,.form-field-container .form-field-content:has(.form-field-input:disabled) .form-field-suffix .form-field-button{cursor:not-allowed!important;pointer-events:none!important}.form-field-container .form-field-content:has(.form-field-input:disabled) .form-field-suffix .form-field-trigger{border-color:#e0e1e2!important;pointer-events:none!important}.form-field-container .form-field-content:has(.form-field-input:disabled) mat-icon{color:#d1d2d4!important;fill:#d1d2d4!important;cursor:not-allowed!important;pointer-events:none!important}.form-field-container .form-field-content.form-field-select,.form-field-container .form-field-content.form-field-select .form-field-input{box-shadow:none!important;cursor:pointer!important}.form-field-container .form-field-content .form-field-input{height:16px;outline:0;border:none;background-color:transparent;color:inherit;flex:1;max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.form-field-container .form-field-content .form-field-suffix{display:flex;flex-direction:row;align-items:center;gap:1.6rem}.form-field-container .form-field-content .form-field-suffix .form-field-trigger{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;border-radius:40px;border:1px solid transparent;color:#131313;background-color:#f0f0f0;font-size:1.2rem;line-height:1.4rem}.form-field-container .form-field-content .form-field-suffix .form-field-button{display:flex;align-items:center;justify-content:center;outline:0;border:none;cursor:pointer;background-color:transparent}.form-field-container .form-field-content .form-field-suffix .form-field-button:hover:not(:disabled)>mat-icon{transform:scale(1.08)}.form-field-icon{width:1.6rem;height:1.6rem;font-size:1.6rem;color:#131313;fill:#131313}.form-field-icon-arrow{border:solid #131313;border-width:0 2px 2px 0;display:inline-block;padding:3px;transform:rotate(45deg);margin:-5px 4px 0}"]
|
9956
9958
|
}),
|
9957
9959
|
__metadata("design:paramtypes", [ChangeDetectorRef,
|
9958
9960
|
ElementRef])
|
@@ -10310,7 +10312,7 @@ GIPIInputCurrencyComponent = GIPIInputCurrencyComponent_1 = __decorate([
|
|
10310
10312
|
'class': 'gipi-input-currency',
|
10311
10313
|
},
|
10312
10314
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
10313
|
-
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.input-currency-container{display:flex;flex-direction:column;gap:1rem;width:100%}.input-currency-container .input-currency-label{color:#131313;font-size:1.4rem;line-height:100%}.input-currency-container .input-currency-label>span{color:#d14014;font-size:inherit;line-height:inherit}.input-currency-container .input-currency-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid
|
10315
|
+
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.input-currency-container{display:flex;flex-direction:column;gap:1rem;width:100%}.input-currency-container .input-currency-label{color:#131313;font-size:1.4rem;line-height:100%}.input-currency-container .input-currency-label>span{color:#d14014;font-size:inherit;line-height:inherit}.input-currency-container .input-currency-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid #0000001f;color:#696969;caret-color:#9a9da2;transition:.2s}.input-currency-container .input-currency-content:focus-within,.input-currency-container .input-currency-content:has(.input-currency-input:active),.input-currency-container .input-currency-content:has(.input-currency-input:focus){box-shadow:0 0 0 .2rem #f0f0f0}.input-currency-container .input-currency-content:focus-within,.input-currency-container .input-currency-content:hover{border-color:#bfbfbf!important}.input-currency-container .input-currency-content:has(.input-currency-input:invalid){border-color:#d14014!important;color:#d14014!important;caret-color:#d14014!important}.input-currency-container .input-currency-content:has(.input-currency-input:invalid):focus-within{box-shadow:0 0 0 .2rem #f1c4b6!important}.input-currency-container .input-currency-content:has(.input-currency-input:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed!important;box-shadow:none!important;pointer-events:none!important}.input-currency-container .input-currency-content .input-currency-input{height:16px;outline:0;border:none;background-color:transparent;color:inherit;flex:1}"]
|
10314
10316
|
}),
|
10315
10317
|
__metadata("design:paramtypes", [ChangeDetectorRef,
|
10316
10318
|
ElementRef])
|
@@ -10712,7 +10714,7 @@ GIPIInputMonthPickerComponent = GIPIInputMonthPickerComponent_1 = __decorate([
|
|
10712
10714
|
'class': 'gipi-input-monthpicker',
|
10713
10715
|
},
|
10714
10716
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
10715
|
-
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.input-monthpicker-container{display:flex;flex-direction:column;gap:1rem;width:100%}.input-monthpicker-container .input-monthpicker-label{color:#131313;font-size:1.4rem;line-height:100%}.input-monthpicker-container .input-monthpicker-label>span{color:#d14014;font-size:inherit;line-height:inherit}.input-monthpicker-container .input-monthpicker-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid
|
10717
|
+
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}.input-monthpicker-container{display:flex;flex-direction:column;gap:1rem;width:100%}.input-monthpicker-container .input-monthpicker-label{color:#131313;font-size:1.4rem;line-height:100%}.input-monthpicker-container .input-monthpicker-label>span{color:#d14014;font-size:inherit;line-height:inherit}.input-monthpicker-container .input-monthpicker-content{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:12px;width:100%;max-height:4rem;border-radius:5px;cursor:text;background-color:#fff;border:1px solid #0000001f;color:#696969;caret-color:#9a9da2;transition:.2s;position:relative}.input-monthpicker-container .input-monthpicker-content:focus-within,.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:active),.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:focus){box-shadow:0 0 0 .2rem #f0f0f0}.input-monthpicker-container .input-monthpicker-content:focus-within,.input-monthpicker-container .input-monthpicker-content:hover{border-color:#bfbfbf!important}.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;box-shadow:none!important;caret-color:#d1d2d4!important;pointer-events:none!important;cursor:not-allowed!important}.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:disabled) .input-monthpicker-input,.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:disabled) .input-monthpicker-suffix .input-monthpicker-button{cursor:not-allowed!important;pointer-events:none!important}.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:disabled) .input-monthpicker-suffix .input-monthpicker-trigger{border-color:#e0e1e2!important;pointer-events:none!important}.input-monthpicker-container .input-monthpicker-content:has(.input-monthpicker-input:disabled) mat-icon{color:#d1d2d4!important;fill:#d1d2d4!important;cursor:not-allowed!important;pointer-events:none!important}.input-monthpicker-container .input-monthpicker-content .input-monthpicker-input{height:16px;max-width:84%;outline:0;border:none;background-color:transparent;color:inherit;flex:1}.input-monthpicker-container .input-monthpicker-content .input-monthpicker-suffix{display:flex;flex-direction:row;align-items:center;gap:16px}.input-monthpicker-container .input-monthpicker-content .input-monthpicker-suffix .input-monthpicker-button{display:flex;align-items:center;justify-content:center;outline:0;border:none;cursor:pointer;background-color:transparent}.input-monthpicker-container .input-monthpicker-content .input-monthpicker-suffix .input-monthpicker-button:hover:not(:disabled)>mat-icon{transform:scale(1.08)}.input-monthpicker-icon{width:1.6rem;height:1.6rem;font-size:1.6rem;color:#131313;fill:#131313}::ng-deep .calendar{width:100%;display:flex;flex-direction:column}::ng-deep .calendar .calendar-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid #aeb1b5;margin-bottom:8px}::ng-deep .calendar .calendar-header .calendar-title{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:1.6rem;line-height:1.8rem;font-weight:600;cursor:default;border-radius:8px;padding:8px;white-space:nowrap}::ng-deep .calendar .calendar-header .calendar-title>mat-icon{font-size:2rem;width:20px;height:20px}::ng-deep .calendar .calendar-header .calendar-title.month:hover{cursor:pointer;background-color:#f0f0f0}::ng-deep .calendar .calendar-header .calendar-controls{display:flex;flex-direction:row;align-items:center;gap:8px}::ng-deep .calendar .calendar-header .calendar-controls>button{display:flex;align-items:center;justify-content:center;padding:8px;border-radius:8px;background-color:#e0313e;cursor:pointer;transition:.3s;border:0;outline:0;color:#fff}::ng-deep .calendar .calendar-header .calendar-controls>button:hover{background-color:#cc2d38}::ng-deep .calendar .calendar-header .calendar-controls>button>mat-icon{font-size:1.8rem;width:18px;height:18px}::ng-deep .calendar .table-months{display:-ms-grid;display:grid;-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr);gap:4px}::ng-deep .calendar .table-months .month{display:flex;align-items:center;justify-content:center;padding:8px;border-radius:8px;font-size:1.4rem;line-height:1.7rem;color:#555659;background-color:#f0f0f0;transition:background-color .1s;cursor:pointer}::ng-deep .calendar .table-months .month.disabled{color:#bbbdc1;background-color:#e0e1e2}::ng-deep .calendar .table-months .month:not(.disabled).selected,::ng-deep .calendar .table-months .month:not(.disabled):hover{color:#fff;background-color:#e0313e}::ng-deep .calendar .table-months .month:not(.disabled).selected:hover{background-color:#cc2d38}::ng-deep .calendar .table-years{display:-ms-grid;display:grid;-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr);gap:4px}::ng-deep .calendar .table-years .year{display:flex;align-items:center;justify-content:center;padding:8px;border-radius:8px;font-size:1.4rem;line-height:1.7rem;color:#555659;background-color:#f0f0f0;transition:background-color .1s;cursor:pointer}::ng-deep .calendar .table-years .year.disabled{color:#bbbdc1;background-color:#e0e1e2}::ng-deep .calendar .table-years .year:not(.disabled).selected,::ng-deep .calendar .table-years .year:not(.disabled):hover{color:#fff;background-color:#e0313e}::ng-deep .calendar .table-years .year:not(.disabled).selected:hover{background-color:#cc2d38}"]
|
10716
10718
|
}),
|
10717
10719
|
__metadata("design:paramtypes", [ChangeDetectorRef,
|
10718
10720
|
GIPINgConfig])
|
@@ -12408,7 +12410,7 @@ GIPIInputSelectComponent = GIPIInputSelectComponent_1 = __decorate([
|
|
12408
12410
|
'class': 'gipi-input-select',
|
12409
12411
|
},
|
12410
12412
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
12411
|
-
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}::ng-deep .overlay-select{padding:0!important;overflow:hidden!important}::ng-deep .select-virtual-scroll-viewport{width:100%!important;max-height:240px;overflow:auto}::ng-deep .select-virtual-scroll-viewport .cdk-virtual-scroll-content-wrapper{width:100%!important;position:relative!important}::ng-deep .select-virtual-scroll-viewport::-webkit-scrollbar{width:15px}::ng-deep .select-virtual-scroll-viewport::-webkit-scrollbar-thumb{background-color:#e0e1e2;border-radius:10px;border:4px solid transparent;background-clip:padding-box}::ng-deep .select-row{display:flex;align-items:center;padding:0 16px;cursor:pointer;font-size:1.3rem;line-height:100%;gap:1rem}::ng-deep .select-row:hover{background:#f5f5f6}::ng-deep .select-row:active{background:#e0e1e2}::ng-deep .select-row.disabled{background-color:#d1d2d4!important;color:#9a9da2!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .select-row>span{display:-webkit-box;line-clamp:2;box-orient:vertical;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden}.select-search{display:flex;align-items:center;font-size:1.4rem;line-height:100%;gap:1rem;padding:8px 12px}.select-option-all{border-bottom:1px solid
|
12413
|
+
styles: [":host{display:block;min-width:0;max-width:100%;flex:1}::ng-deep .overlay-select{padding:0!important;overflow:hidden!important}::ng-deep .select-virtual-scroll-viewport{width:100%!important;max-height:240px;overflow:auto}::ng-deep .select-virtual-scroll-viewport .cdk-virtual-scroll-content-wrapper{width:100%!important;position:relative!important}::ng-deep .select-virtual-scroll-viewport::-webkit-scrollbar{width:15px}::ng-deep .select-virtual-scroll-viewport::-webkit-scrollbar-thumb{background-color:#e0e1e2;border-radius:10px;border:4px solid transparent;background-clip:padding-box}::ng-deep .select-row{display:flex;align-items:center;padding:0 16px;cursor:pointer;font-size:1.3rem;line-height:100%;gap:1rem}::ng-deep .select-row:hover{background:#f5f5f6}::ng-deep .select-row:active{background:#e0e1e2}::ng-deep .select-row.disabled{background-color:#d1d2d4!important;color:#9a9da2!important;cursor:not-allowed!important;pointer-events:none!important}::ng-deep .select-row>span{display:-webkit-box;line-clamp:2;box-orient:vertical;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden}.select-search{display:flex;align-items:center;font-size:1.4rem;line-height:100%;gap:1rem;padding:8px 12px}.select-option-all{border-bottom:1px solid #0000001f}.select-not-found{display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:600;font-size:1.2rem;gap:8px;color:#131313;cursor:default;padding:1.6rem 0}.select-not-found>mat-icon{width:2.8rem;height:2.8rem;font-size:2.8rem;line-height:2.8rem;color:#131313}.select-loading{height:4rem;width:100%;background-color:#fff;display:flex;align-items:center;justify-content:center}.select-loading .dot-pulse{position:relative;left:-9999px;width:5px;height:5px;border-radius:50%;background-color:#e0313e;color:#e0313e;box-shadow:9999px 0 0 -5px;-webkit-animation:1.5s linear .25s infinite dot-pulse;animation:1.5s linear .25s infinite dot-pulse}.select-loading .dot-pulse::after,.select-loading .dot-pulse::before{content:\"\";display:inline-block;position:absolute;top:0;width:5px;height:5px;border-radius:50%;background-color:#e0313e;color:#e0313e}.select-loading .dot-pulse::before{box-shadow:9984px 0 0 -5px;-webkit-animation:1.5s linear infinite dot-pulse-before;animation:1.5s linear infinite dot-pulse-before}.select-loading .dot-pulse::after{box-shadow:10014px 0 0 -5px;-webkit-animation:1.5s linear .5s infinite dot-pulse-after;animation:1.5s linear .5s infinite dot-pulse-after}@-webkit-keyframes dot-pulse-before{0%,100%,60%{box-shadow:9984px 0 0 -5px}30%{box-shadow:9984px 0 0 2px}}@keyframes dot-pulse-before{0%,100%,60%{box-shadow:9984px 0 0 -5px}30%{box-shadow:9984px 0 0 2px}}@-webkit-keyframes dot-pulse{0%,100%,60%{box-shadow:9999px 0 0 -5px}30%{box-shadow:9999px 0 0 2px}}@keyframes dot-pulse{0%,100%,60%{box-shadow:9999px 0 0 -5px}30%{box-shadow:9999px 0 0 2px}}@-webkit-keyframes dot-pulse-after{0%,100%,60%{box-shadow:10014px 0 0 -5px}30%{box-shadow:10014px 0 0 2px}}@keyframes dot-pulse-after{0%,100%,60%{box-shadow:10014px 0 0 -5px}30%{box-shadow:10014px 0 0 2px}}.select-footer{display:flex;align-items:center;gap:1rem;padding:8px 12px;border-top:1px solid #bfbfbf}::ng-deep .select-mat-option-pseudo-checkbox{margin:0!important}"]
|
12412
12414
|
}),
|
12413
12415
|
__metadata("design:paramtypes", [ChangeDetectorRef])
|
12414
12416
|
], GIPIInputSelectComponent);
|
@@ -14726,7 +14728,7 @@ GIPIRadioGroupComponent = GIPIRadioGroupComponent_1 = __decorate([
|
|
14726
14728
|
'class': 'gipi-radio-group',
|
14727
14729
|
},
|
14728
14730
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
14729
|
-
styles: [".radiogroup-content{display:flex;flex-direction:column;gap:1rem}.radiogroup-content>label,.radiogroup-content>legend{font-weight:400;font-size:1.4rem;line-height:100%;color:#131313}.radiogroup-content>label>span,.radiogroup-content>legend>span{color:#d14014}.radiogroup-content .radiogroup{display:flex;align-items:center;gap:1rem;padding:8px 0}.fieldset-radio-content{height:6.6rem;border-color
|
14731
|
+
styles: [".radiogroup-content{display:flex;flex-direction:column;gap:1rem}.radiogroup-content>label,.radiogroup-content>legend{font-weight:400;font-size:1.4rem;line-height:100%;color:#131313}.radiogroup-content>label>span,.radiogroup-content>legend>span{color:#d14014}.radiogroup-content .radiogroup{display:flex;align-items:center;gap:1rem;padding:8px 0}.fieldset-radio-content{height:6.6rem;border-color:#0000001f;border-radius:5px}.fieldset-radio-content .radiogroup{width:100%;height:100%;justify-content:space-around}"]
|
14730
14732
|
}),
|
14731
14733
|
__metadata("design:paramtypes", [ChangeDetectorRef])
|
14732
14734
|
], GIPIRadioGroupComponent);
|
@@ -14972,7 +14974,7 @@ GIPIRangePageComponent = GIPIRangePageComponent_1 = __decorate([
|
|
14972
14974
|
multi: true
|
14973
14975
|
},
|
14974
14976
|
],
|
14975
|
-
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid
|
14977
|
+
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}:host .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0;text-align:center;margin:0!important}:host .input-content .input-element::-webkit-inner-spin-button,:host .input-content .input-element::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;opacity:0}:host .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}:host .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}:host .input-content .input-element:disabled{cursor:not-allowed}:host .input-content .infix,:host .input-content .prefix,:host .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;padding-inline:.8rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:.2s;background-color:#e0313e}:host .input-content .infix>mat-icon,:host .input-content .prefix>mat-icon,:host .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#fff}:host .input-content .infix:not(.infix):not(.disabled):hover,:host .input-content .prefix:not(.infix):not(.disabled):hover,:host .input-content .suffix:not(.infix):not(.disabled):hover{background-color:#cc2d38}:host .input-content .infix:not(.infix):not(.disabled):active,:host .input-content .prefix:not(.infix):not(.disabled):active,:host .input-content .suffix:not(.infix):not(.disabled):active{background-color:#9f232c}:host .input-content .prefix.disabled,:host .input-content .suffix.disabled{background-color:#d1d2d4}:host .input-content .prefix.disabled>mat-icon,:host .input-content .suffix.disabled>mat-icon{color:#9a9da2}:host .input-content .prefix{border-right:1px solid #0000001f;border-radius:.6rem 0 0 .6rem;cursor:pointer}:host .input-content .infix{width:1rem;padding:0;background-color:transparent}:host .input-content .suffix{border-left:1px solid #0000001f;border-radius:0 .6rem .6rem 0;cursor:pointer}:host .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
14976
14978
|
}),
|
14977
14979
|
__metadata("design:paramtypes", [ElementRef,
|
14978
14980
|
ChangeDetectorRef])
|
@@ -15312,7 +15314,7 @@ GIPIRangeSliderComponent = GIPIRangeSliderComponent_1 = __decorate([
|
|
15312
15314
|
'class': 'gipi-range-slider',
|
15313
15315
|
},
|
15314
15316
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
15315
|
-
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .slider-wrapper{display:flex;align-items:center;justify-content:space-between;gap:1.6rem}:host .slider-wrapper>input{display:flex;font-family:inherit;font-size:inherit;color:inherit;text-align:center;padding:.75rem .8rem;background:#fff;border:1px solid
|
15317
|
+
styles: [":host{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .slider-wrapper{display:flex;align-items:center;justify-content:space-between;gap:1.6rem}:host .slider-wrapper>input{display:flex;font-family:inherit;font-size:inherit;color:inherit;text-align:center;padding:.75rem .8rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem;outline:0}:host .sliders-control{display:flex;align-items:center;justify-content:center;padding:2rem;position:relative;flex:1}:host .from-value,:host .to-value{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:.6rem;border-radius:.4rem;width:100%;position:absolute;background-color:#e0e1e2;pointer-events:none;outline:0}:host .from-value::-webkit-slider-thumb,:host .to-value::-webkit-slider-thumb{-webkit-appearance:none;display:block;width:1.4rem;height:1.4rem;border-radius:50%;background-color:#e0313e;pointer-events:all;box-shadow:0 .5px 0 0 rgba(0,0,0,.08),0 1px 1px 0 rgba(0,0,0,.14);cursor:-webkit-grab;cursor:grab;outline:0}:host .from-value::-webkit-slider-thumb:hover,:host .to-value::-webkit-slider-thumb:hover{background-color:#cc2d38}:host .from-value::-webkit-slider-thumb:active,:host .to-value::-webkit-slider-thumb:active{box-shadow:inset 0 0 3px #e0313e,0 0 9px #e0313e;-webkit-box-shadow:inset 0 0 3px #e0313e,0 0 9px #e0313e;cursor:-webkit-grabbing;cursor:grabbing}:host input[type=number]{border:1px solid #0000001f;color:#131313;width:50px;height:30px;font-size:20px;outline:0}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;opacity:0}:host #fromSlider{height:0;z-index:1}"]
|
15316
15318
|
}),
|
15317
15319
|
__metadata("design:paramtypes", [ElementRef,
|
15318
15320
|
ChangeDetectorRef])
|
@@ -15494,7 +15496,7 @@ GIPISelectButtonComponent = GIPISelectButtonComponent_1 = __decorate([
|
|
15494
15496
|
'class': 'gipi-select-button',
|
15495
15497
|
},
|
15496
15498
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
15497
|
-
styles: [".select-button-content{display:flex;flex-direction:column;gap:1rem}.select-button-content .label{font-weight:400;font-size:1.4rem;line-height:100%;color:#131313}.select-button-content .label>span{color:#d14014}.select-button-content .select-button{display:flex;flex-direction:row}.select-button-content .select-button .button{width:100%;padding:1.2rem 1.6rem;font-weight:700;font-size:1.3rem;line-height:100%;text-align:center;cursor:pointer;background-color:#fff;border:1px solid
|
15499
|
+
styles: [".select-button-content{display:flex;flex-direction:column;gap:1rem}.select-button-content .label{font-weight:400;font-size:1.4rem;line-height:100%;color:#131313}.select-button-content .label>span{color:#d14014}.select-button-content .select-button{display:flex;flex-direction:row}.select-button-content .select-button .button{width:100%;padding:1.2rem 1.6rem;font-weight:700;font-size:1.3rem;line-height:100%;text-align:center;cursor:pointer;background-color:#fff;border:1px solid #0000001f;color:#696969;height:4rem;display:flex;align-items:center;justify-content:center}.select-button-content .select-button .button:hover{background-color:#f5f5f6}.select-button-content .select-button .button:first-child{border-top-left-radius:5px;border-bottom-left-radius:5px}.select-button-content .select-button .button:last-child{border-top-right-radius:5px;border-bottom-right-radius:5px}.select-button-content .select-button .button.disabled{pointer-events:none!important;cursor:not-allowed!important;border-color:#e0e1e2!important;color:#d1d2d4!important}.select-button-content .select-button .button.disabled.selected{background-color:#e0e1e2!important}.select-button-content .select-button .button.button-primary.selected{background-color:#e0313e;border-color:#e0313e;color:#fff}.select-button-content .select-button .button.button-primary:hover.selected{background-color:#cc2d38}.select-button-content .select-button .button.button-secondary.selected{background-color:#9a9da2;border-color:#9a9da2;color:#fff}.select-button-content .select-button .button.button-secondary:hover.selected{background-color:#8c8f93}"]
|
15498
15500
|
}),
|
15499
15501
|
__metadata("design:paramtypes", [ElementRef,
|
15500
15502
|
ChangeDetectorRef])
|
@@ -17676,7 +17678,7 @@ GIPITextareaComponent = GIPITextareaComponent_1 = __decorate([
|
|
17676
17678
|
'class': 'gipi-textarea',
|
17677
17679
|
},
|
17678
17680
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
17679
|
-
styles: [":host{display:flex;min-width:0;max-width:100%;flex:1;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .textarea-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .textarea-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .textarea-element{display:flex;font-family:inherit;font-size:inherit;color:inherit;padding:.75rem .8rem;background:#fff;border:1px solid
|
17681
|
+
styles: [":host{display:flex;min-width:0;max-width:100%;flex:1;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}:host .textarea-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}:host .textarea-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}:host .textarea-element{display:flex;font-family:inherit;font-size:inherit;color:inherit;padding:.75rem .8rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:6px;caret-color:#696969;max-height:12rem;min-height:6rem;resize:vertical;outline:0;overflow:auto}:host .textarea-element:not(:disabled):hover{border-color:#6d6f73}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled:hover,:host .textarea-element:not(:disabled):invalid:enabled:hover{border-color:#e07f62}:host .textarea-element:not(:disabled):enabled:focus{outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled,:host .textarea-element:not(:disabled):invalid:enabled{border-color:#d14014}:host .textarea-element:not(:disabled).ng-dirty.ng-invalid:enabled:focus,:host .textarea-element:not(:disabled):invalid:enabled:focus{outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #f1c4b6;border-color:#d14014}:host .textarea-element:disabled{color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}:host .textarea-element.resize-none{resize:none}:host .textarea-element.resize-both{resize:both}:host .textarea-element.resize-horizontal{resize:horizontal}:host .textarea-element.resize-vertical{resize:vertical}:host .textarea-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
17680
17682
|
}),
|
17681
17683
|
__metadata("design:paramtypes", [ElementRef,
|
17682
17684
|
ChangeDetectorRef])
|
@@ -21854,7 +21856,7 @@ MatDateRangeInput = MatDateRangeInput_1 = __decorate([
|
|
21854
21856
|
{ provide: MatFormFieldControl, useExisting: MatDateRangeInput_1 },
|
21855
21857
|
{ provide: MAT_DATE_RANGE_INPUT_PARENT, useExisting: MatDateRangeInput_1 },
|
21856
21858
|
],
|
21857
|
-
styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center;padding-bottom:3px}.mat-date-range-input-separator{transition:opacity .4s cubic-bezier(.25,.8,.25,1) .133s;margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none
|
21859
|
+
styles: [".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center;padding-bottom:3px}.mat-date-range-input-separator{transition:opacity .4s cubic-bezier(.25,.8,.25,1) .133s;margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:0 0;color:currentColor;border:none;outline:0;padding:0;margin:0;vertical-align:bottom;text-align:inherit;width:100%;-moz-appearance:none;appearance:none;-webkit-appearance:none}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-moz-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-inner:-ms-input-placeholder{transition:color .4s cubic-bezier(.25,.8,.25,1) .133s}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder,.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent!important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}"]
|
21858
21860
|
}),
|
21859
21861
|
__param(2, Optional()), __param(2, Self()),
|
21860
21862
|
__param(3, Optional()),
|
@@ -22660,7 +22662,7 @@ DateRangePickerComponent = DateRangePickerComponent_1 = __decorate([
|
|
22660
22662
|
host: {
|
22661
22663
|
'class': 'gipi-date-range-picker',
|
22662
22664
|
},
|
22663
|
-
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid
|
22665
|
+
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .mat-date-range-input{height:4rem!important;padding-left:.8rem!important}::ng-deep .mat-date-range-input-container,::ng-deep .mat-date-range-input-end-wrapper,::ng-deep .mat-date-range-input-inner,::ng-deep .mat-date-range-input-start-wrapper{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;max-width:100%;min-height:100%;height:100%;padding-bottom:3px}::ng-deep .mat-date-range-input-end-wrapper{padding-bottom:0!important}::ng-deep .mat-date-range-input-inner{padding:0!important}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
22664
22666
|
}),
|
22665
22667
|
__metadata("design:paramtypes", [ElementRef,
|
22666
22668
|
ChangeDetectorRef])
|
@@ -23188,7 +23190,7 @@ DatepickerComponent = DatepickerComponent_1 = __decorate([
|
|
23188
23190
|
host: {
|
23189
23191
|
'class': 'gipi-datepicker',
|
23190
23192
|
},
|
23191
|
-
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid
|
23193
|
+
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
23192
23194
|
}),
|
23193
23195
|
__metadata("design:paramtypes", [ElementRef,
|
23194
23196
|
ChangeDetectorRef])
|
@@ -23290,162 +23292,3157 @@ DatepickerModule = __decorate([
|
|
23290
23292
|
})
|
23291
23293
|
], DatepickerModule);
|
23292
23294
|
|
23293
|
-
|
23294
|
-
|
23295
|
-
|
23296
|
-
|
23297
|
-
|
23298
|
-
|
23299
|
-
|
23300
|
-
|
23301
|
-
|
23302
|
-
|
23303
|
-
|
23295
|
+
/**
|
23296
|
+
* This animation fades in the background color and text content of the
|
23297
|
+
* select's options. It is time delayed to occur 100ms after the overlay
|
23298
|
+
* panel has transformed in.
|
23299
|
+
*/
|
23300
|
+
const fadeInContent = trigger('fadeInContent', [
|
23301
|
+
state('showing', style({ opacity: 1 })),
|
23302
|
+
transition('void => showing', [
|
23303
|
+
style({ opacity: 0 }),
|
23304
|
+
animate(`150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)`),
|
23305
|
+
]),
|
23306
|
+
]);
|
23307
|
+
const slideCalendar = trigger('slideCalendar', [
|
23308
|
+
transition('* => left', [
|
23309
|
+
animate(180, keyframes([
|
23310
|
+
style({ transform: 'translateX(100%)', offset: 0.5 }),
|
23311
|
+
style({ transform: 'translateX(-100%)', offset: 0.51 }),
|
23312
|
+
style({ transform: 'translateX(0)', offset: 1 }),
|
23313
|
+
])),
|
23314
|
+
]),
|
23315
|
+
transition('* => right', [
|
23316
|
+
animate(180, keyframes([
|
23317
|
+
style({ transform: 'translateX(-100%)', offset: 0.5 }),
|
23318
|
+
style({ transform: 'translateX(100%)', offset: 0.51 }),
|
23319
|
+
style({ transform: 'translateX(0)', offset: 1 }),
|
23320
|
+
])),
|
23321
|
+
]),
|
23322
|
+
]);
|
23323
|
+
|
23324
|
+
/** @docs-private */
|
23325
|
+
function createMissingDateImplError$1(provider) {
|
23326
|
+
return Error(`GIPIDatetimepickerComponent: No provider found for ${provider}. You must import one of the following ` +
|
23327
|
+
`modules at your application root: GIPINativeDatetimeModule, GIPIMomentDatetimeModule, or provide a ` +
|
23328
|
+
`custom implementation.`);
|
23329
|
+
}
|
23330
|
+
|
23331
|
+
var GIPIDatetimepickerFilterType;
|
23332
|
+
(function (GIPIDatetimepickerFilterType) {
|
23333
|
+
GIPIDatetimepickerFilterType[GIPIDatetimepickerFilterType["DATE"] = 0] = "DATE";
|
23334
|
+
GIPIDatetimepickerFilterType[GIPIDatetimepickerFilterType["HOUR"] = 1] = "HOUR";
|
23335
|
+
GIPIDatetimepickerFilterType[GIPIDatetimepickerFilterType["MINUTE"] = 2] = "MINUTE";
|
23336
|
+
})(GIPIDatetimepickerFilterType || (GIPIDatetimepickerFilterType = {}));
|
23337
|
+
|
23338
|
+
/**
|
23339
|
+
* An internal class that represents the data corresponding to a single calendar cell.
|
23340
|
+
* @docs-private
|
23341
|
+
*/
|
23342
|
+
class GIPIDatetimepickerCalendarCell {
|
23343
|
+
constructor(value, displayValue, ariaLabel, enabled) {
|
23344
|
+
this.value = value;
|
23345
|
+
this.displayValue = displayValue;
|
23346
|
+
this.ariaLabel = ariaLabel;
|
23347
|
+
this.enabled = enabled;
|
23304
23348
|
}
|
23305
|
-
|
23306
|
-
|
23307
|
-
|
23308
|
-
|
23309
|
-
|
23310
|
-
|
23311
|
-
|
23312
|
-
|
23313
|
-
|
23314
|
-
|
23315
|
-
|
23316
|
-
|
23317
|
-
|
23349
|
+
}
|
23350
|
+
/**
|
23351
|
+
* An internal component used to display calendar data in a table.
|
23352
|
+
* @docs-private
|
23353
|
+
*/
|
23354
|
+
let GIPIDatetimepickerCalendarBodyComponent = class GIPIDatetimepickerCalendarBodyComponent {
|
23355
|
+
constructor() {
|
23356
|
+
/**
|
23357
|
+
* The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
|
23358
|
+
* maintained even as the table resizes.
|
23359
|
+
*/
|
23360
|
+
this.cellAspectRatio = 1;
|
23361
|
+
/** The number of columns in the table. */
|
23362
|
+
this.numCols = 7;
|
23363
|
+
/** Whether to allow selection of disabled cells. */
|
23364
|
+
this.allowDisabledSelection = false;
|
23365
|
+
/** The cell number of the active cell in the table. */
|
23366
|
+
this.activeCell = 0;
|
23367
|
+
/** Emits when a new value is selected. */
|
23368
|
+
this.selectedValueChange = new EventEmitter();
|
23318
23369
|
}
|
23319
|
-
|
23320
|
-
if (this.
|
23321
|
-
|
23322
|
-
this._changeDetectorRef.markForCheck();
|
23323
|
-
}));
|
23370
|
+
_cellClicked(cell) {
|
23371
|
+
if (!this.allowDisabledSelection && !cell.enabled) {
|
23372
|
+
return;
|
23324
23373
|
}
|
23374
|
+
this.selectedValueChange.emit(cell.value);
|
23325
23375
|
}
|
23326
|
-
|
23327
|
-
this.
|
23328
|
-
|
23329
|
-
|
23330
|
-
|
23331
|
-
this._animationState = 'void';
|
23332
|
-
if (this._changeDetectorRef) {
|
23333
|
-
this._changeDetectorRef.markForCheck();
|
23376
|
+
_isActiveCell(rowIndex, colIndex) {
|
23377
|
+
let cellNumber = rowIndex * this.numCols + colIndex;
|
23378
|
+
// Account for the fact that the first row may not have as many cells.
|
23379
|
+
if (rowIndex) {
|
23380
|
+
cellNumber -= this._firstRowOffset;
|
23334
23381
|
}
|
23382
|
+
return cellNumber === this.activeCell;
|
23335
23383
|
}
|
23336
|
-
|
23337
|
-
|
23338
|
-
|
23339
|
-
|
23384
|
+
ngOnChanges(changes) {
|
23385
|
+
const columnChanges = changes['numCols'];
|
23386
|
+
const { rows, numCols } = this;
|
23387
|
+
if (changes['rows'] || columnChanges) {
|
23388
|
+
this._firstRowOffset = rows && rows.length && rows[0].length ? numCols - rows[0].length : 0;
|
23340
23389
|
}
|
23341
|
-
|
23342
|
-
|
23343
|
-
|
23344
|
-
if (this.
|
23345
|
-
this.
|
23390
|
+
if (changes['cellAspectRatio'] || columnChanges || !this._cellPadding) {
|
23391
|
+
this._cellPadding = `${50 * this.cellAspectRatio / numCols}%`;
|
23392
|
+
}
|
23393
|
+
if (columnChanges || !this._cellWidth) {
|
23394
|
+
this._cellWidth = `${100 / numCols}%`;
|
23346
23395
|
}
|
23347
23396
|
}
|
23348
|
-
|
23349
|
-
|
23350
|
-
|
23351
|
-
|
23397
|
+
};
|
23398
|
+
__decorate([
|
23399
|
+
Input(),
|
23400
|
+
__metadata("design:type", Number)
|
23401
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "cellAspectRatio", void 0);
|
23402
|
+
__decorate([
|
23403
|
+
Input(),
|
23404
|
+
__metadata("design:type", String)
|
23405
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "label", void 0);
|
23406
|
+
__decorate([
|
23407
|
+
Input(),
|
23408
|
+
__metadata("design:type", Array)
|
23409
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "rows", void 0);
|
23410
|
+
__decorate([
|
23411
|
+
Input(),
|
23412
|
+
__metadata("design:type", Number)
|
23413
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "todayValue", void 0);
|
23414
|
+
__decorate([
|
23415
|
+
Input(),
|
23416
|
+
__metadata("design:type", Number)
|
23417
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "selectedValue", void 0);
|
23418
|
+
__decorate([
|
23419
|
+
Input(),
|
23420
|
+
__metadata("design:type", Number)
|
23421
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "labelMinRequiredCells", void 0);
|
23422
|
+
__decorate([
|
23423
|
+
Input(),
|
23424
|
+
__metadata("design:type", Object)
|
23425
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "numCols", void 0);
|
23426
|
+
__decorate([
|
23427
|
+
Input(),
|
23428
|
+
__metadata("design:type", Object)
|
23429
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "allowDisabledSelection", void 0);
|
23430
|
+
__decorate([
|
23431
|
+
Input(),
|
23432
|
+
__metadata("design:type", Object)
|
23433
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "activeCell", void 0);
|
23434
|
+
__decorate([
|
23435
|
+
Output(),
|
23436
|
+
__metadata("design:type", Object)
|
23437
|
+
], GIPIDatetimepickerCalendarBodyComponent.prototype, "selectedValueChange", void 0);
|
23438
|
+
GIPIDatetimepickerCalendarBodyComponent = __decorate([
|
23439
|
+
Component({
|
23440
|
+
selector: 'tbody[gipiMatDatetimePickerCalendarBody]',
|
23441
|
+
template: "<!-- Se n\u00E3o houver espa\u00E7o suficiente na primeira linha, crie uma linha de r\u00F3tulo separada. Marcamos esta linha\ncomo aria-hidden porque n\u00E3o queremos que seja lido como uma das semanas do m\u00EAs. -->\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\"\n aria-hidden=\"true\">\n\n <td class=\"gipi-mat-datetime-picker-calendar-body-label\"\n [attr.colspan]=\"numCols\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{ label }}\n </td>\n\n</tr>\n\n<!-- Crie a primeira linha separadamente para que possamos incluir uma c\u00E9lula espa\u00E7adora especial. -->\n<tr *ngFor=\"let row of rows; let rowIndex = index\"\n role=\"row\">\n <!-- Marcamos esta c\u00E9lula como oculta por \u00E1ria para que n\u00E3o seja lida como um dos dias da semana. -->\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\"\n aria-hidden=\"true\"\n class=\"gipi-mat-datetime-picker-calendar-body-label\"\n [attr.colspan]=\"_firstRowOffset\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\n </td>\n\n <td *ngFor=\"let item of row; let colIndex = index\"\n role=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-body-cell\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-label]=\"item.ariaLabel\"\n [class.gipi-mat-datetime-picker-calendar-body-active]=\"_isActiveCell(rowIndex, colIndex)\"\n [class.gipi-mat-datetime-picker-calendar-body-disabled]=\"!item.enabled\"\n (click)=\"_cellClicked(item)\"\n [style.width]=\"_cellWidth\"\n [style.paddingTop]=\"_cellPadding\"\n [style.paddingBottom]=\"_cellPadding\">\n\n <div class=\"gipi-mat-datetime-picker-calendar-body-cell-content\"\n [class.gipi-mat-datetime-picker-calendar-body-selected]=\"selectedValue === item.value\"\n [class.gipi-mat-datetime-picker-calendar-body-today]=\"todayValue === item.value\"\n [attr.aria-selected]=\"selectedValue === item.value\">\n {{ item.displayValue }}\n </div>\n\n </td>\n</tr>\n",
|
23442
|
+
encapsulation: ViewEncapsulation.None,
|
23443
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
23444
|
+
host: {
|
23445
|
+
class: 'gipi-mat-datetime-picker-calendar-body',
|
23446
|
+
},
|
23447
|
+
styles: [".gipi-mat-datetime-picker-calendar-body{font-size:13px;min-width:224px}.gipi-mat-datetime-picker-calendar-body-label{padding:7.14286% 0 7.14286% 7.14286%;height:0;line-height:0;color:rgba(0,0,0,.54);transform:translateX(-6px);text-align:left}.gipi-mat-datetime-picker-calendar-body-cell{position:relative;width:14.28571%;height:0;line-height:0;padding:7.14286% 0;text-align:center;outline:0;cursor:pointer}.gipi-mat-datetime-picker-calendar-body-disabled{cursor:default;pointer-events:none}.gipi-mat-datetime-picker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;color:rgba(0,0,0,.87);border:1px solid transparent;border-radius:50%}.gipi-mat-datetime-picker-calendar-body-disabled>.gipi-mat-datetime-picker-calendar-body-cell-content:not(.gipi-mat-datetime-picker-calendar-body-selected){color:rgba(0,0,0,.38)}.mat-calendar:focus .gipi-mat-datetime-picker-calendar-body-active>.gipi-mat-datetime-picker-calendar-body-cell-content:not(.gipi-mat-datetime-picker-calendar-body-selected),:not(.gipi-mat-datetime-picker-calendar-body-disabled):hover>.gipi-mat-datetime-picker-calendar-body-cell-content:not(.gipi-mat-datetime-picker-calendar-body-selected){background-color:rgba(0,0,0,.12)}.gipi-mat-datetime-picker-calendar-body-disabled>.gipi-mat-datetime-picker-calendar-body-today:not(.gipi-mat-datetime-picker-calendar-body-selected){border-color:rgba(0,0,0,.18)}[dir=rtl] .gipi-mat-datetime-picker-calendar-body-label{padding:0 7.14286% 0 0;transform:translateX(6px);text-align:right}"]
|
23448
|
+
})
|
23449
|
+
], GIPIDatetimepickerCalendarBodyComponent);
|
23450
|
+
|
23451
|
+
class GIPIDatetimeAdapter extends DateAdapter$1 {
|
23452
|
+
constructor(_delegate) {
|
23453
|
+
super();
|
23454
|
+
this._delegate = _delegate;
|
23352
23455
|
}
|
23353
|
-
|
23354
|
-
return this.
|
23456
|
+
getValidDateOrNull(obj) {
|
23457
|
+
return this.isDateInstance(obj) && this.isValid(obj) ? obj : null;
|
23355
23458
|
}
|
23356
|
-
|
23357
|
-
|
23358
|
-
|
23359
|
-
|
23459
|
+
compareDatetime(first, second, respectMinutePart = true) {
|
23460
|
+
return (this.compareDate(first, second) ||
|
23461
|
+
this.getHour(first) - this.getHour(second) ||
|
23462
|
+
(respectMinutePart && this.getMinute(first) - this.getMinute(second)));
|
23360
23463
|
}
|
23361
|
-
|
23362
|
-
|
23363
|
-
|
23364
|
-
const
|
23365
|
-
|
23366
|
-
|
23367
|
-
disabled = index < minMonth || index > maxMonth;
|
23368
|
-
}
|
23369
|
-
else if (!ObjectUtil.isNull(minMonth)) {
|
23370
|
-
disabled = index < minMonth;
|
23371
|
-
}
|
23372
|
-
else if (!ObjectUtil.isNull(maxMonth)) {
|
23373
|
-
disabled = index > maxMonth;
|
23464
|
+
sameDatetime(first, second) {
|
23465
|
+
if (first && second) {
|
23466
|
+
const firstValid = this.isValid(first);
|
23467
|
+
const secondValid = this.isValid(second);
|
23468
|
+
if (firstValid && secondValid) {
|
23469
|
+
return !this.compareDatetime(first, second);
|
23374
23470
|
}
|
23471
|
+
return firstValid === secondValid;
|
23375
23472
|
}
|
23376
|
-
return
|
23377
|
-
// let disabled = false;
|
23378
|
-
// if (this._enabledMonths && this._enabledMonths.length > 0) {
|
23379
|
-
// disabled = this._enabledMonths.indexOf(index) < 0;
|
23380
|
-
// }
|
23381
|
-
// if (this._disabledMonths && this._disabledMonths.length > 0) {
|
23382
|
-
// disabled = this._disabledMonths.indexOf(index) >= 0;
|
23383
|
-
// }
|
23384
|
-
// return disabled;
|
23473
|
+
return first === second;
|
23385
23474
|
}
|
23386
|
-
|
23387
|
-
|
23388
|
-
this.isShowYears = !this.isShowYears;
|
23389
|
-
this._renderYears();
|
23475
|
+
sameYear(first, second) {
|
23476
|
+
return first && second && this.getYear(first) === this.getYear(second);
|
23390
23477
|
}
|
23391
|
-
|
23392
|
-
|
23393
|
-
|
23394
|
-
this.
|
23395
|
-
|
23396
|
-
for (let i = 0; i <= 12; i++) {
|
23397
|
-
this.years.push(this.monthYearPicker.model.selectedYearMoment.year() + i);
|
23398
|
-
}
|
23478
|
+
sameDay(first, second) {
|
23479
|
+
return (first &&
|
23480
|
+
second &&
|
23481
|
+
this.getDate(first) === this.getDate(second) &&
|
23482
|
+
this.sameMonthAndYear(first, second));
|
23399
23483
|
}
|
23400
|
-
|
23401
|
-
|
23402
|
-
|
23403
|
-
|
23404
|
-
|
23484
|
+
sameHour(first, second) {
|
23485
|
+
return (first &&
|
23486
|
+
second &&
|
23487
|
+
this.getHour(first) === this.getHour(second) &&
|
23488
|
+
this.sameDay(first, second));
|
23405
23489
|
}
|
23406
|
-
|
23407
|
-
|
23408
|
-
|
23409
|
-
|
23410
|
-
|
23411
|
-
|
23412
|
-
|
23413
|
-
|
23414
|
-
this.
|
23490
|
+
sameMinute(first, second) {
|
23491
|
+
return (first &&
|
23492
|
+
second &&
|
23493
|
+
this.getMinute(first) === this.getMinute(second) &&
|
23494
|
+
this.sameHour(first, second));
|
23495
|
+
}
|
23496
|
+
sameMonthAndYear(first, second) {
|
23497
|
+
if (first && second) {
|
23498
|
+
const firstValid = this.isValid(first);
|
23499
|
+
const secondValid = this.isValid(second);
|
23500
|
+
if (firstValid && secondValid) {
|
23501
|
+
return !(this.getYear(first) - this.getYear(second) ||
|
23502
|
+
this.getMonth(first) - this.getMonth(second));
|
23503
|
+
}
|
23504
|
+
return firstValid === secondValid;
|
23415
23505
|
}
|
23506
|
+
return first === second;
|
23416
23507
|
}
|
23417
|
-
|
23418
|
-
|
23508
|
+
// delegate
|
23509
|
+
deserialize(value) {
|
23510
|
+
return this._delegate.deserialize(value);
|
23419
23511
|
}
|
23420
|
-
|
23421
|
-
return
|
23512
|
+
clone(date) {
|
23513
|
+
return this._delegate.clone(date);
|
23422
23514
|
}
|
23423
|
-
|
23424
|
-
|
23425
|
-
if (!ObjectUtil.isNull(this.monthYearPicker)) {
|
23426
|
-
const minYear = !ObjectUtil.isNull(this.monthYearPicker.min) ? this.monthYearPicker.min.year : null;
|
23427
|
-
const maxYear = !ObjectUtil.isNull(this.monthYearPicker.max) ? this.monthYearPicker.max.year : null;
|
23428
|
-
if (!ObjectUtil.isNull(minYear) && !ObjectUtil.isNull(maxYear)) {
|
23429
|
-
disabled = index < minYear || index > maxYear;
|
23430
|
-
}
|
23431
|
-
else if (!ObjectUtil.isNull(minYear)) {
|
23432
|
-
disabled = index < minYear;
|
23433
|
-
}
|
23434
|
-
else if (!ObjectUtil.isNull(maxYear)) {
|
23435
|
-
disabled = index > maxYear;
|
23436
|
-
}
|
23437
|
-
}
|
23438
|
-
return disabled;
|
23439
|
-
// let disabled: boolean = false;
|
23440
|
-
// if (this._enabledYears && this._enabledYears.length > 0) {
|
23441
|
-
// disabled = this._enabledYears.findIndex(y => y === year) < 0;
|
23442
|
-
// }
|
23443
|
-
// if (this._disabledYears && this._disabledYears.length > 0) {
|
23444
|
-
// disabled = this._disabledYears.findIndex(y => y === year) >= 0;
|
23445
|
-
// }
|
23446
|
-
// return disabled;
|
23515
|
+
addCalendarYears(date, years) {
|
23516
|
+
return this._delegate.addCalendarYears(date, years);
|
23447
23517
|
}
|
23448
|
-
|
23518
|
+
addCalendarMonths(date, months) {
|
23519
|
+
return this._delegate.addCalendarMonths(date, months);
|
23520
|
+
}
|
23521
|
+
addCalendarDays(date, days) {
|
23522
|
+
return this._delegate.addCalendarDays(date, days);
|
23523
|
+
}
|
23524
|
+
getYear(date) {
|
23525
|
+
return this._delegate.getYear(date);
|
23526
|
+
}
|
23527
|
+
getMonth(date) {
|
23528
|
+
return this._delegate.getMonth(date);
|
23529
|
+
}
|
23530
|
+
getDate(date) {
|
23531
|
+
return this._delegate.getDate(date);
|
23532
|
+
}
|
23533
|
+
getDayOfWeek(date) {
|
23534
|
+
return this._delegate.getDayOfWeek(date);
|
23535
|
+
}
|
23536
|
+
getMonthNames(style) {
|
23537
|
+
return this._delegate.getMonthNames(style);
|
23538
|
+
}
|
23539
|
+
getDateNames() {
|
23540
|
+
return this._delegate.getDateNames();
|
23541
|
+
}
|
23542
|
+
getDayOfWeekNames(style) {
|
23543
|
+
return this._delegate.getDayOfWeekNames(style);
|
23544
|
+
}
|
23545
|
+
getYearName(date) {
|
23546
|
+
return this._delegate.getYearName(date);
|
23547
|
+
}
|
23548
|
+
getFirstDayOfWeek() {
|
23549
|
+
return this._delegate.getFirstDayOfWeek();
|
23550
|
+
}
|
23551
|
+
getNumDaysInMonth(date) {
|
23552
|
+
return this._delegate.getNumDaysInMonth(date);
|
23553
|
+
}
|
23554
|
+
createDate(year, month, date) {
|
23555
|
+
return this._delegate.createDate(year, month, date);
|
23556
|
+
}
|
23557
|
+
today() {
|
23558
|
+
return this._delegate.today();
|
23559
|
+
}
|
23560
|
+
parse(value, parseFormat) {
|
23561
|
+
return this._delegate.parse(value, parseFormat);
|
23562
|
+
}
|
23563
|
+
format(date, displayFormat) {
|
23564
|
+
return this._delegate.format(date, displayFormat);
|
23565
|
+
}
|
23566
|
+
toIso8601(date) {
|
23567
|
+
return this._delegate.toIso8601(date);
|
23568
|
+
}
|
23569
|
+
isDateInstance(obj) {
|
23570
|
+
return this._delegate.isDateInstance(obj);
|
23571
|
+
}
|
23572
|
+
isValid(date) {
|
23573
|
+
return this._delegate.isValid(date);
|
23574
|
+
}
|
23575
|
+
invalid() {
|
23576
|
+
return this._delegate.invalid();
|
23577
|
+
}
|
23578
|
+
clampDate(date, min, max) {
|
23579
|
+
if (min && this.compareDatetime(date, min) < 0) {
|
23580
|
+
return min;
|
23581
|
+
}
|
23582
|
+
if (max && this.compareDatetime(date, max) > 0) {
|
23583
|
+
return max;
|
23584
|
+
}
|
23585
|
+
return date;
|
23586
|
+
}
|
23587
|
+
}
|
23588
|
+
|
23589
|
+
const yearsPerPage$2 = 24;
|
23590
|
+
const yearsPerRow$1 = 4;
|
23591
|
+
/**
|
23592
|
+
* An internal component used to display multiple years in the datepicker.
|
23593
|
+
* @docs-private
|
23594
|
+
*/
|
23595
|
+
let GIPIDatetimepickerMultiYearViewComponent = class GIPIDatetimepickerMultiYearViewComponent {
|
23596
|
+
constructor(_adapter, _dateFormats) {
|
23597
|
+
this._adapter = _adapter;
|
23598
|
+
this._dateFormats = _dateFormats;
|
23599
|
+
this.type = 'date';
|
23600
|
+
/** Emits when a new month is selected. */
|
23601
|
+
this.selectedChange = new EventEmitter();
|
23602
|
+
this._userSelection = new EventEmitter();
|
23603
|
+
if (!this._adapter) {
|
23604
|
+
throw createMissingDateImplError$1('GIPIDatetimeAdapter');
|
23605
|
+
}
|
23606
|
+
if (!this._dateFormats) {
|
23607
|
+
throw createMissingDateImplError$1('GIPI_DATETIME_FORMATS');
|
23608
|
+
}
|
23609
|
+
this._activeDate = this._adapter.today();
|
23610
|
+
}
|
23611
|
+
get activeDate() {
|
23612
|
+
return this._activeDate;
|
23613
|
+
}
|
23614
|
+
set activeDate(value) {
|
23615
|
+
let oldActiveDate = this._activeDate;
|
23616
|
+
this._activeDate = value || this._adapter.today();
|
23617
|
+
if (oldActiveDate && this._activeDate && !isSameMultiYearView$1(this._adapter, oldActiveDate, this._activeDate, this.minDate, this.maxDate)) {
|
23618
|
+
this._init();
|
23619
|
+
}
|
23620
|
+
}
|
23621
|
+
get selected() {
|
23622
|
+
return this._selected;
|
23623
|
+
}
|
23624
|
+
set selected(value) {
|
23625
|
+
this._selected = value;
|
23626
|
+
this._selectedYear = this._selected && this._adapter.getYear(this._selected);
|
23627
|
+
}
|
23628
|
+
get minDate() {
|
23629
|
+
return this._minDate;
|
23630
|
+
}
|
23631
|
+
set minDate(value) {
|
23632
|
+
this._minDate = this._getValidDateOrNull(this._adapter.deserialize(value));
|
23633
|
+
}
|
23634
|
+
get maxDate() {
|
23635
|
+
return this._maxDate;
|
23636
|
+
}
|
23637
|
+
set maxDate(value) {
|
23638
|
+
this._maxDate = this._getValidDateOrNull(this._adapter.deserialize(value));
|
23639
|
+
}
|
23640
|
+
ngAfterContentInit() {
|
23641
|
+
this._init();
|
23642
|
+
}
|
23643
|
+
/** Handles when a new year is selected. */
|
23644
|
+
_yearSelected(year) {
|
23645
|
+
const month = this._adapter.getMonth(this.activeDate);
|
23646
|
+
const normalizedDate = this._adapter.createDatetime(year, month, 1, 0, 0);
|
23647
|
+
this.selectedChange.emit(this._adapter.createDatetime(year, month, Math.min(this._adapter.getDate(this.activeDate), this._adapter.getNumDaysInMonth(normalizedDate)), this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate)));
|
23648
|
+
if (this.type === 'year') {
|
23649
|
+
this._userSelection.emit();
|
23650
|
+
}
|
23651
|
+
}
|
23652
|
+
_getActiveCell() {
|
23653
|
+
return getActiveOffset$1(this._adapter, this.activeDate, this.minDate, this.maxDate);
|
23654
|
+
}
|
23655
|
+
_calendarStateDone() {
|
23656
|
+
this._calendarState = '';
|
23657
|
+
}
|
23658
|
+
/** Initializes this year view. */
|
23659
|
+
_init() {
|
23660
|
+
this._todayYear = this._adapter.getYear(this._adapter.today());
|
23661
|
+
this._yearLabel = this._adapter.getYearName(this.activeDate);
|
23662
|
+
const activeYear = this._adapter.getYear(this.activeDate);
|
23663
|
+
const minYearOfPage = activeYear - getActiveOffset$1(this._adapter, this.activeDate, this.minDate, this.maxDate);
|
23664
|
+
this._years = [];
|
23665
|
+
for (let i = 0, row = []; i < yearsPerPage$2; i++) {
|
23666
|
+
row.push(minYearOfPage + i);
|
23667
|
+
if (row.length == yearsPerRow$1) {
|
23668
|
+
this._years.push(row.map((year) => this._createCellForYear(year)));
|
23669
|
+
row = [];
|
23670
|
+
}
|
23671
|
+
}
|
23672
|
+
}
|
23673
|
+
/** Creates an GIPIDatetimepickerCalendarCell for the given year. */
|
23674
|
+
_createCellForYear(year) {
|
23675
|
+
let yearName = this._adapter.getYearName(this._adapter.createDate(year, 0, 1));
|
23676
|
+
return new GIPIDatetimepickerCalendarCell(year, yearName, yearName, this._shouldEnableYear(year));
|
23677
|
+
}
|
23678
|
+
/** Whether the given year is enabled. */
|
23679
|
+
_shouldEnableYear(year) {
|
23680
|
+
// disable if the year is greater than maxDate lower than minDate
|
23681
|
+
if (year === undefined ||
|
23682
|
+
year === null ||
|
23683
|
+
(this.maxDate && year > this._adapter.getYear(this.maxDate)) ||
|
23684
|
+
(this.minDate && year < this._adapter.getYear(this.minDate))) {
|
23685
|
+
return false;
|
23686
|
+
}
|
23687
|
+
// enable if it reaches here and there's no filter defined
|
23688
|
+
if (!this.dateFilter) {
|
23689
|
+
return true;
|
23690
|
+
}
|
23691
|
+
const firstOfYear = this._adapter.createDate(year, 0, 1);
|
23692
|
+
// If any date in the year is enabled count the year as enabled.
|
23693
|
+
for (let date = firstOfYear; this._adapter.getYear(date) == year; date = this._adapter.addCalendarDays(date, 1)) {
|
23694
|
+
if (this.dateFilter(date)) {
|
23695
|
+
return true;
|
23696
|
+
}
|
23697
|
+
}
|
23698
|
+
return false;
|
23699
|
+
}
|
23700
|
+
/**
|
23701
|
+
* Gets the year in this years range that the given Date falls on.
|
23702
|
+
* Returns null if the given Date is not in this range.
|
23703
|
+
*/
|
23704
|
+
_getYearInCurrentRange(date) {
|
23705
|
+
const year = this._adapter.getYear(date);
|
23706
|
+
return this._isInRange(year) ? year : null;
|
23707
|
+
}
|
23708
|
+
/**
|
23709
|
+
* Validate if the current year is in the current range
|
23710
|
+
* Returns true if is in range else returns false
|
23711
|
+
*/
|
23712
|
+
_isInRange(year) {
|
23713
|
+
return true;
|
23714
|
+
}
|
23715
|
+
/**
|
23716
|
+
* @param obj The object to check.
|
23717
|
+
* @returns The given object if it is both a date instance and valid, otherwise null.
|
23718
|
+
*/
|
23719
|
+
_getValidDateOrNull(obj) {
|
23720
|
+
return this._adapter.isDateInstance(obj) && this._adapter.isValid(obj) ? obj : null;
|
23721
|
+
}
|
23722
|
+
};
|
23723
|
+
GIPIDatetimepickerMultiYearViewComponent.ctorParameters = () => [
|
23724
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
23725
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [GIPI_DATETIME_FORMATS,] }] }
|
23726
|
+
];
|
23727
|
+
__decorate([
|
23728
|
+
Input(),
|
23729
|
+
__metadata("design:type", String)
|
23730
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "type", void 0);
|
23731
|
+
__decorate([
|
23732
|
+
Input(),
|
23733
|
+
__metadata("design:type", Function)
|
23734
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "dateFilter", void 0);
|
23735
|
+
__decorate([
|
23736
|
+
Input(),
|
23737
|
+
__metadata("design:type", Object),
|
23738
|
+
__metadata("design:paramtypes", [Object])
|
23739
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "activeDate", null);
|
23740
|
+
__decorate([
|
23741
|
+
Input(),
|
23742
|
+
__metadata("design:type", Object),
|
23743
|
+
__metadata("design:paramtypes", [Object])
|
23744
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "selected", null);
|
23745
|
+
__decorate([
|
23746
|
+
Input(),
|
23747
|
+
__metadata("design:type", Object),
|
23748
|
+
__metadata("design:paramtypes", [Object])
|
23749
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "minDate", null);
|
23750
|
+
__decorate([
|
23751
|
+
Input(),
|
23752
|
+
__metadata("design:type", Object),
|
23753
|
+
__metadata("design:paramtypes", [Object])
|
23754
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "maxDate", null);
|
23755
|
+
__decorate([
|
23756
|
+
Output(),
|
23757
|
+
__metadata("design:type", Object)
|
23758
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "selectedChange", void 0);
|
23759
|
+
__decorate([
|
23760
|
+
Output(),
|
23761
|
+
__metadata("design:type", Object)
|
23762
|
+
], GIPIDatetimepickerMultiYearViewComponent.prototype, "_userSelection", void 0);
|
23763
|
+
GIPIDatetimepickerMultiYearViewComponent = __decorate([
|
23764
|
+
Component({
|
23765
|
+
selector: 'gipi-mat-datetime-picker-multi-year-view',
|
23766
|
+
template: "<table class=\"gipi-mat-datetime-picker-calendar-table\">\n <thead class=\"gipi-mat-datetime-picker-calendar-table-header\">\n <tr>\n <th class=\"gipi-mat-datetime-picker-calendar-table-header-divider\"\n colspan=\"4\">\n </th>\n </tr>\n </thead>\n <tbody gipiMatDatetimePickerCalendarBody\n role=\"grid\"\n allowDisabledSelection=\"true\"\n [cellAspectRatio]=\"4 / 7\"\n [numCols]=\"4\"\n [rows]=\"_years\"\n [activeCell]=\"_getActiveCell()\"\n [selectedValue]=\"_selectedYear\"\n [todayValue]=\"_todayYear\"\n [@slideCalendar]=\"_calendarState\"\n (@slideCalendar.done)=\"_calendarStateDone()\"\n (selectedValueChange)=\"_yearSelected($event)\">\n </tbody>\n</table>",
|
23767
|
+
animations: [slideCalendar],
|
23768
|
+
encapsulation: ViewEncapsulation.None,
|
23769
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
23770
|
+
}),
|
23771
|
+
__param(0, Optional()),
|
23772
|
+
__param(1, Optional()),
|
23773
|
+
__param(1, Inject(GIPI_DATETIME_FORMATS)),
|
23774
|
+
__metadata("design:paramtypes", [GIPIDatetimeAdapter, Object])
|
23775
|
+
], GIPIDatetimepickerMultiYearViewComponent);
|
23776
|
+
function isSameMultiYearView$1(dateAdapter, date1, date2, minDate, maxDate) {
|
23777
|
+
const year1 = dateAdapter.getYear(date1);
|
23778
|
+
const year2 = dateAdapter.getYear(date2);
|
23779
|
+
const startingYear = getStartingYear$1(dateAdapter, minDate, maxDate);
|
23780
|
+
return (Math.floor((year1 - startingYear) / yearsPerPage$2) === Math.floor((year2 - startingYear) / yearsPerPage$2));
|
23781
|
+
}
|
23782
|
+
/**
|
23783
|
+
* When the multi-year view is first opened, the active year will be in view.
|
23784
|
+
* So we compute how many years are between the active year and the *slot* where our
|
23785
|
+
* "startingYear" will render when paged into view.
|
23786
|
+
*/
|
23787
|
+
function getActiveOffset$1(dateAdapter, activeDate, minDate, maxDate) {
|
23788
|
+
const activeYear = dateAdapter.getYear(activeDate);
|
23789
|
+
return euclideanModulo$1(activeYear - getStartingYear$1(dateAdapter, minDate, maxDate), yearsPerPage$2);
|
23790
|
+
}
|
23791
|
+
/**
|
23792
|
+
* We pick a "starting" year such that either the maximum year would be at the end
|
23793
|
+
* or the minimum year would be at the beginning of a page.
|
23794
|
+
*/
|
23795
|
+
function getStartingYear$1(dateAdapter, minDate, maxDate) {
|
23796
|
+
let startingYear = 0;
|
23797
|
+
if (maxDate) {
|
23798
|
+
const maxYear = dateAdapter.getYear(maxDate);
|
23799
|
+
startingYear = maxYear - yearsPerPage$2 + 1;
|
23800
|
+
}
|
23801
|
+
else if (minDate) {
|
23802
|
+
startingYear = dateAdapter.getYear(minDate);
|
23803
|
+
}
|
23804
|
+
return startingYear;
|
23805
|
+
}
|
23806
|
+
/** Gets remainder that is non-negative, even if first number is negative */
|
23807
|
+
function euclideanModulo$1(a, b) {
|
23808
|
+
return ((a % b) + b) % b;
|
23809
|
+
}
|
23810
|
+
|
23811
|
+
/**
|
23812
|
+
* A calendar that is used as part of the datepicker.
|
23813
|
+
* @docs-private
|
23814
|
+
*/
|
23815
|
+
let GIPIDatetimepickerCalendarComponent = class GIPIDatetimepickerCalendarComponent {
|
23816
|
+
constructor(_elementRef, _intl, _ngZone, _adapter, _dateFormats, changeDetectorRef) {
|
23817
|
+
this._elementRef = _elementRef;
|
23818
|
+
this._intl = _intl;
|
23819
|
+
this._ngZone = _ngZone;
|
23820
|
+
this._adapter = _adapter;
|
23821
|
+
this._dateFormats = _dateFormats;
|
23822
|
+
this._clockView = 'hour';
|
23823
|
+
/** Active multi year view when click on year. */
|
23824
|
+
this.multiYearSelector = true;
|
23825
|
+
/** Whether the calendar should be started in month or year view. */
|
23826
|
+
this.startView = 'month';
|
23827
|
+
this.twelvehour = false;
|
23828
|
+
this.timeInterval = 1;
|
23829
|
+
this.ariaLabel = 'Use arrow keys to navigate';
|
23830
|
+
this.ariaNextMonthLabel = 'Next month';
|
23831
|
+
this.ariaPrevMonthLabel = 'Previous month';
|
23832
|
+
this.ariaNextYearLabel = 'Next year';
|
23833
|
+
this.ariaPrevYearLabel = 'Previous year';
|
23834
|
+
this.ariaNextMultiYearLabel = 'Next year range';
|
23835
|
+
this.ariaPrevMultiYearLabel = 'Previous year range';
|
23836
|
+
/** Prevent user to select same date time */
|
23837
|
+
this.preventSameDateTimeSelection = false;
|
23838
|
+
this._type = 'date';
|
23839
|
+
/** Emits when the currently selected date changes. */
|
23840
|
+
this.selectedChange = new EventEmitter();
|
23841
|
+
/** Emits when the view has been changed. **/
|
23842
|
+
this.viewChanged = new EventEmitter();
|
23843
|
+
this._userSelection = new EventEmitter();
|
23844
|
+
/** Date filter for the month and year views. */
|
23845
|
+
this._dateFilterForViews = (date) => {
|
23846
|
+
return (!!date &&
|
23847
|
+
(!this.dateFilter || this.dateFilter(date, GIPIDatetimepickerFilterType.DATE)) &&
|
23848
|
+
(!this.minDate || this._adapter.compareDate(date, this.minDate) >= 0) &&
|
23849
|
+
(!this.maxDate || this._adapter.compareDate(date, this.maxDate) <= 0));
|
23850
|
+
};
|
23851
|
+
if (!this._adapter) {
|
23852
|
+
throw createMissingDateImplError$1('GIPIDatetimeAdapter');
|
23853
|
+
}
|
23854
|
+
if (!this._dateFormats) {
|
23855
|
+
throw createMissingDateImplError$1('GIPI_DATETIME_FORMATS');
|
23856
|
+
}
|
23857
|
+
this._intlChanges = _intl.changes.subscribe(() => changeDetectorRef.markForCheck());
|
23858
|
+
}
|
23859
|
+
get type() {
|
23860
|
+
return this._type;
|
23861
|
+
}
|
23862
|
+
set type(value) {
|
23863
|
+
this._type = value || 'date';
|
23864
|
+
if (this.type === 'year') {
|
23865
|
+
this.multiYearSelector = true;
|
23866
|
+
}
|
23867
|
+
}
|
23868
|
+
get startAt() {
|
23869
|
+
return this._startAt;
|
23870
|
+
}
|
23871
|
+
set startAt(value) {
|
23872
|
+
this._startAt = this._adapter.getValidDateOrNull(value);
|
23873
|
+
}
|
23874
|
+
get selected() {
|
23875
|
+
return this._selected;
|
23876
|
+
}
|
23877
|
+
set selected(value) {
|
23878
|
+
this._selected = this._adapter.getValidDateOrNull(value);
|
23879
|
+
}
|
23880
|
+
get minDate() {
|
23881
|
+
return this._minDate;
|
23882
|
+
}
|
23883
|
+
set minDate(value) {
|
23884
|
+
this._minDate = this._adapter.getValidDateOrNull(value);
|
23885
|
+
}
|
23886
|
+
get maxDate() {
|
23887
|
+
return this._maxDate;
|
23888
|
+
}
|
23889
|
+
set maxDate(value) {
|
23890
|
+
this._maxDate = this._adapter.getValidDateOrNull(value);
|
23891
|
+
}
|
23892
|
+
/** The current active date. This determines which time period is shown and which date is highlighted when using keyboard navigation. */
|
23893
|
+
get _activeDate() {
|
23894
|
+
return this._clampedActiveDate;
|
23895
|
+
}
|
23896
|
+
set _activeDate(value) {
|
23897
|
+
const oldActiveDate = this._clampedActiveDate;
|
23898
|
+
this._clampedActiveDate = this._adapter.clampDate(value, this.minDate, this.maxDate);
|
23899
|
+
if (oldActiveDate &&
|
23900
|
+
this._clampedActiveDate &&
|
23901
|
+
this.currentView === 'month' &&
|
23902
|
+
!this._adapter.sameMonthAndYear(oldActiveDate, this._clampedActiveDate)) {
|
23903
|
+
if (this._adapter.isInNextMonth(oldActiveDate, this._clampedActiveDate)) {
|
23904
|
+
this.calendarState('right');
|
23905
|
+
}
|
23906
|
+
else {
|
23907
|
+
this.calendarState('left');
|
23908
|
+
}
|
23909
|
+
}
|
23910
|
+
}
|
23911
|
+
get currentView() {
|
23912
|
+
return this._currentView;
|
23913
|
+
}
|
23914
|
+
set currentView(view) {
|
23915
|
+
this._currentView = view;
|
23916
|
+
this.viewChanged.emit(view);
|
23917
|
+
}
|
23918
|
+
/** The label for the current calendar view. */
|
23919
|
+
get _yearLabel() {
|
23920
|
+
return this._adapter.getYearName(this._activeDate);
|
23921
|
+
}
|
23922
|
+
get _monthYearLabel() {
|
23923
|
+
if (this.currentView === 'multi-year') {
|
23924
|
+
// The offset from the active year to the "slot" for the starting year is the
|
23925
|
+
// *actual* first rendered year in the multi-year view, and the last year is
|
23926
|
+
// just yearsPerPage - 1 away.
|
23927
|
+
const activeYear = this._adapter.getYear(this._activeDate);
|
23928
|
+
const minYearOfPage = activeYear - getActiveOffset$1(this._adapter, this._activeDate, this.minDate, this.maxDate);
|
23929
|
+
const maxYearOfPage = minYearOfPage + yearsPerPage$2 - 1;
|
23930
|
+
const minYearName = this._adapter.getYearName(this._adapter.createDate(minYearOfPage, 0, 1));
|
23931
|
+
const maxYearName = this._adapter.getYearName(this._adapter.createDate(maxYearOfPage, 0, 1));
|
23932
|
+
return this._intl.formatYearRange(minYearName, maxYearName);
|
23933
|
+
}
|
23934
|
+
return this.currentView === 'month'
|
23935
|
+
? this._adapter.getMonthNames('long')[this._adapter.getMonth(this._activeDate)]
|
23936
|
+
: this._adapter.getYearName(this._activeDate);
|
23937
|
+
}
|
23938
|
+
get _dateLabel() {
|
23939
|
+
switch (this.type) {
|
23940
|
+
case 'month': return this._adapter.getMonthNames('long')[this._adapter.getMonth(this._activeDate)];
|
23941
|
+
default: return this._adapter.format(this._activeDate, this._dateFormats.display.popupHeaderDateLabel);
|
23942
|
+
}
|
23943
|
+
}
|
23944
|
+
get periodButtonLabel() {
|
23945
|
+
return this.currentView == 'month' ? this._intl.switchToMultiYearViewLabel : this._intl.switchToMonthViewLabel;
|
23946
|
+
}
|
23947
|
+
/** The label for the previous button. */
|
23948
|
+
get prevButtonLabel() {
|
23949
|
+
return {
|
23950
|
+
'month': this._intl.prevMonthLabel,
|
23951
|
+
'year': this._intl.prevYearLabel,
|
23952
|
+
'multi-year': this._intl.prevMultiYearLabel
|
23953
|
+
}[this.currentView];
|
23954
|
+
}
|
23955
|
+
/** The label for the next button. */
|
23956
|
+
get nextButtonLabel() {
|
23957
|
+
return {
|
23958
|
+
'month': this._intl.nextMonthLabel,
|
23959
|
+
'year': this._intl.nextYearLabel,
|
23960
|
+
'multi-year': this._intl.nextMultiYearLabel
|
23961
|
+
}[this.currentView];
|
23962
|
+
}
|
23963
|
+
get _hoursLabel() {
|
23964
|
+
let hour = this._adapter.getHour(this._activeDate);
|
23965
|
+
if (!!this.twelvehour) {
|
23966
|
+
if (hour === 0) {
|
23967
|
+
hour = 24;
|
23968
|
+
}
|
23969
|
+
hour = hour > 12 ? hour - 12 : hour;
|
23970
|
+
}
|
23971
|
+
return this._2digit(hour);
|
23972
|
+
}
|
23973
|
+
get _minutesLabel() {
|
23974
|
+
return this._2digit(this._adapter.getMinute(this._activeDate));
|
23975
|
+
}
|
23976
|
+
get _ariaLabelNext() {
|
23977
|
+
switch (this._currentView) {
|
23978
|
+
case 'month': return this.ariaNextMonthLabel;
|
23979
|
+
case 'year': return this.ariaNextYearLabel;
|
23980
|
+
case 'multi-year': return this.ariaNextMultiYearLabel;
|
23981
|
+
default: return '';
|
23982
|
+
}
|
23983
|
+
}
|
23984
|
+
get _ariaLabelPrev() {
|
23985
|
+
switch (this._currentView) {
|
23986
|
+
case 'month': return this.ariaPrevMonthLabel;
|
23987
|
+
case 'year': return this.ariaPrevYearLabel;
|
23988
|
+
case 'multi-year': return this.ariaPrevMultiYearLabel;
|
23989
|
+
default: return '';
|
23990
|
+
}
|
23991
|
+
}
|
23992
|
+
ngAfterContentInit() {
|
23993
|
+
this._activeDate = this.startAt || this._adapter.today();
|
23994
|
+
this._selectAMPM(this._activeDate);
|
23995
|
+
this._focusActiveCell();
|
23996
|
+
if (this.type === 'year') {
|
23997
|
+
this.currentView = 'multi-year';
|
23998
|
+
}
|
23999
|
+
else if (this.type === 'month') {
|
24000
|
+
this.currentView = 'year';
|
24001
|
+
}
|
24002
|
+
else if (this.type === 'time') {
|
24003
|
+
this.currentView = 'clock';
|
24004
|
+
}
|
24005
|
+
else {
|
24006
|
+
this.currentView = this.startView || 'month';
|
24007
|
+
}
|
24008
|
+
}
|
24009
|
+
ngOnDestroy() {
|
24010
|
+
this._intlChanges.unsubscribe();
|
24011
|
+
}
|
24012
|
+
_userSelected() {
|
24013
|
+
this._userSelection.emit();
|
24014
|
+
}
|
24015
|
+
/** Handles date selection in the month view. */
|
24016
|
+
_dateSelected(date) {
|
24017
|
+
if (this.type === 'date') {
|
24018
|
+
if (!this._adapter.sameDate(date, this.selected) ||
|
24019
|
+
!this.preventSameDateTimeSelection) {
|
24020
|
+
this.selectedChange.emit(date);
|
24021
|
+
}
|
24022
|
+
}
|
24023
|
+
else {
|
24024
|
+
this._activeDate = date;
|
24025
|
+
this.currentView = 'clock';
|
24026
|
+
}
|
24027
|
+
}
|
24028
|
+
/** Handles month selection in the year view. */
|
24029
|
+
_monthSelected(month) {
|
24030
|
+
if (this.type === 'month') {
|
24031
|
+
if (!this._adapter.sameMonthAndYear(month, this.selected) ||
|
24032
|
+
!this.preventSameDateTimeSelection) {
|
24033
|
+
this.selectedChange.emit(this._adapter.getFirstDateOfMonth(month));
|
24034
|
+
}
|
24035
|
+
}
|
24036
|
+
else {
|
24037
|
+
this._activeDate = month;
|
24038
|
+
this.currentView = 'month';
|
24039
|
+
this._clockView = 'hour';
|
24040
|
+
}
|
24041
|
+
}
|
24042
|
+
/** Handles year selection in the multi year view. */
|
24043
|
+
_yearSelected(year) {
|
24044
|
+
if (this.type === 'year') {
|
24045
|
+
if (!this._adapter.sameYear(year, this.selected) ||
|
24046
|
+
!this.preventSameDateTimeSelection) {
|
24047
|
+
const normalizedDate = this._adapter.createDatetime(this._adapter.getYear(year), 0, 1, 0, 0);
|
24048
|
+
this.selectedChange.emit(normalizedDate);
|
24049
|
+
}
|
24050
|
+
}
|
24051
|
+
else {
|
24052
|
+
this._activeDate = year;
|
24053
|
+
this.currentView = 'year';
|
24054
|
+
}
|
24055
|
+
}
|
24056
|
+
_timeSelected(date) {
|
24057
|
+
if (this._clockView !== 'minute') {
|
24058
|
+
this._activeDate = this._updateDate(date);
|
24059
|
+
this._clockView = 'minute';
|
24060
|
+
}
|
24061
|
+
else {
|
24062
|
+
if (!this._adapter.sameDatetime(date, this.selected) ||
|
24063
|
+
!this.preventSameDateTimeSelection) {
|
24064
|
+
this.selectedChange.emit(date);
|
24065
|
+
}
|
24066
|
+
}
|
24067
|
+
}
|
24068
|
+
_onActiveDateChange(date) {
|
24069
|
+
this._activeDate = date;
|
24070
|
+
}
|
24071
|
+
_updateDate(date) {
|
24072
|
+
if (!!this.twelvehour) {
|
24073
|
+
const HOUR = this._adapter.getHour(date);
|
24074
|
+
if (HOUR === 12) {
|
24075
|
+
if (this._AMPM === 'AM') {
|
24076
|
+
return this._adapter.addCalendarHours(date, -12);
|
24077
|
+
}
|
24078
|
+
}
|
24079
|
+
else if (this._AMPM === 'PM') {
|
24080
|
+
return this._adapter.addCalendarHours(date, 12);
|
24081
|
+
}
|
24082
|
+
}
|
24083
|
+
return date;
|
24084
|
+
}
|
24085
|
+
_selectAMPM(date) {
|
24086
|
+
if (this._adapter.getHour(date) > 11) {
|
24087
|
+
this._AMPM = 'PM';
|
24088
|
+
}
|
24089
|
+
else {
|
24090
|
+
this._AMPM = 'AM';
|
24091
|
+
}
|
24092
|
+
}
|
24093
|
+
_ampmClicked(source) {
|
24094
|
+
if (source === this._AMPM) {
|
24095
|
+
return;
|
24096
|
+
}
|
24097
|
+
this._AMPM = source;
|
24098
|
+
if (this._AMPM === 'AM') {
|
24099
|
+
this._activeDate = this._adapter.addCalendarHours(this._activeDate, -12);
|
24100
|
+
}
|
24101
|
+
else {
|
24102
|
+
this._activeDate = this._adapter.addCalendarHours(this._activeDate, 12);
|
24103
|
+
}
|
24104
|
+
}
|
24105
|
+
_yearClicked() {
|
24106
|
+
if (this.type === 'year' || this.multiYearSelector) {
|
24107
|
+
this.currentView = 'multi-year';
|
24108
|
+
return;
|
24109
|
+
}
|
24110
|
+
this.currentView = 'year';
|
24111
|
+
}
|
24112
|
+
_dateClicked() {
|
24113
|
+
if (this.type !== 'month') {
|
24114
|
+
this.currentView = 'month';
|
24115
|
+
}
|
24116
|
+
}
|
24117
|
+
_hoursClicked() {
|
24118
|
+
this.currentView = 'clock';
|
24119
|
+
this._clockView = 'hour';
|
24120
|
+
}
|
24121
|
+
_minutesClicked() {
|
24122
|
+
this.currentView = 'clock';
|
24123
|
+
this._clockView = 'minute';
|
24124
|
+
}
|
24125
|
+
/** Handles user clicks on the previous button. */
|
24126
|
+
_previousClicked() {
|
24127
|
+
this._activeDate = this.currentView === 'month'
|
24128
|
+
? this._adapter.addCalendarMonths(this._activeDate, -1)
|
24129
|
+
: this._adapter.addCalendarYears(this._activeDate, this.currentView === 'year' ? -1 : -yearsPerPage$2);
|
24130
|
+
}
|
24131
|
+
/** Handles user clicks on the next button. */
|
24132
|
+
_nextClicked() {
|
24133
|
+
this._activeDate = (this.currentView === 'month')
|
24134
|
+
? this._adapter.addCalendarMonths(this._activeDate, 1)
|
24135
|
+
: this._adapter.addCalendarYears(this._activeDate, this.currentView === 'year' ? 1 : yearsPerPage$2);
|
24136
|
+
}
|
24137
|
+
/** Whether the previous period button is enabled. */
|
24138
|
+
_previousEnabled() {
|
24139
|
+
if (!this.minDate) {
|
24140
|
+
return true;
|
24141
|
+
}
|
24142
|
+
return !this.minDate || !this._isSameView(this._activeDate, this.minDate);
|
24143
|
+
}
|
24144
|
+
/** Whether the next period button is enabled. */
|
24145
|
+
_nextEnabled() {
|
24146
|
+
return !this.maxDate || !this._isSameView(this._activeDate, this.maxDate);
|
24147
|
+
}
|
24148
|
+
/** Handles keydown events on the calendar body. */
|
24149
|
+
_handleCalendarBodyKeydown(event) {
|
24150
|
+
// TODO(mmalerba): We currently allow keyboard navigation to disabled dates, but just prevent
|
24151
|
+
// disabled ones from being selected. This may not be ideal, we should look into whether
|
24152
|
+
// navigation should skip over disabled dates, and if so, how to implement that efficiently.
|
24153
|
+
if (this.currentView === 'month') {
|
24154
|
+
this._handleCalendarBodyKeydownInMonthView(event);
|
24155
|
+
}
|
24156
|
+
else if (this.currentView === 'year') {
|
24157
|
+
this._handleCalendarBodyKeydownInYearView(event);
|
24158
|
+
}
|
24159
|
+
else if (this.currentView === 'multi-year') {
|
24160
|
+
this._handleCalendarBodyKeydownInMultiYearView(event);
|
24161
|
+
}
|
24162
|
+
else {
|
24163
|
+
this._handleCalendarBodyKeydownInClockView(event);
|
24164
|
+
}
|
24165
|
+
}
|
24166
|
+
_focusActiveCell() {
|
24167
|
+
this._ngZone.runOutsideAngular(() => {
|
24168
|
+
this._ngZone.onStable
|
24169
|
+
.asObservable()
|
24170
|
+
.pipe(first())
|
24171
|
+
.subscribe(() => this._elementRef.nativeElement.focus());
|
24172
|
+
});
|
24173
|
+
}
|
24174
|
+
_calendarStateDone() {
|
24175
|
+
this._calendarState = '';
|
24176
|
+
}
|
24177
|
+
/** Whether the two dates represent the same view in the current view mode (month or year). */
|
24178
|
+
_isSameView(date1, date2) {
|
24179
|
+
if (this.currentView === 'month') {
|
24180
|
+
return (this._adapter.getYear(date1) === this._adapter.getYear(date2) &&
|
24181
|
+
this._adapter.getMonth(date1) === this._adapter.getMonth(date2));
|
24182
|
+
}
|
24183
|
+
if (this.currentView === 'year') {
|
24184
|
+
return this._adapter.getYear(date1) === this._adapter.getYear(date2);
|
24185
|
+
}
|
24186
|
+
// Otherwise we are in 'multi-year' view.
|
24187
|
+
return isSameMultiYearView$1(this._adapter, date1, date2, this.minDate, this.maxDate);
|
24188
|
+
}
|
24189
|
+
/** Handles keydown events on the calendar body when calendar is in month view. */
|
24190
|
+
_handleCalendarBodyKeydownInMonthView(event) {
|
24191
|
+
switch (event.keyCode) {
|
24192
|
+
case LEFT_ARROW:
|
24193
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, -1);
|
24194
|
+
break;
|
24195
|
+
case RIGHT_ARROW:
|
24196
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, 1);
|
24197
|
+
break;
|
24198
|
+
case UP_ARROW:
|
24199
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, -7);
|
24200
|
+
break;
|
24201
|
+
case DOWN_ARROW:
|
24202
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, 7);
|
24203
|
+
break;
|
24204
|
+
case HOME:
|
24205
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, 1 - this._adapter.getDate(this._activeDate));
|
24206
|
+
break;
|
24207
|
+
case END:
|
24208
|
+
this._activeDate = this._adapter.addCalendarDays(this._activeDate, this._adapter.getNumDaysInMonth(this._activeDate) - this._adapter.getDate(this._activeDate));
|
24209
|
+
break;
|
24210
|
+
case PAGE_UP:
|
24211
|
+
this._activeDate = event.altKey
|
24212
|
+
? this._adapter.addCalendarYears(this._activeDate, -1)
|
24213
|
+
: this._adapter.addCalendarMonths(this._activeDate, -1);
|
24214
|
+
break;
|
24215
|
+
case PAGE_DOWN:
|
24216
|
+
this._activeDate = event.altKey
|
24217
|
+
? this._adapter.addCalendarYears(this._activeDate, 1)
|
24218
|
+
: this._adapter.addCalendarMonths(this._activeDate, 1);
|
24219
|
+
break;
|
24220
|
+
case ENTER:
|
24221
|
+
if (this._dateFilterForViews(this._activeDate)) {
|
24222
|
+
this._dateSelected(this._activeDate);
|
24223
|
+
// Prevent unexpected default actions such as form submission.
|
24224
|
+
event.preventDefault();
|
24225
|
+
}
|
24226
|
+
return;
|
24227
|
+
default:
|
24228
|
+
// Don't prevent default or focus active cell on keys that we don't explicitly handle.
|
24229
|
+
return;
|
24230
|
+
}
|
24231
|
+
// Prevent unexpected default actions such as form submission.
|
24232
|
+
event.preventDefault();
|
24233
|
+
}
|
24234
|
+
/** Handles keydown events on the calendar body when calendar is in year view. */
|
24235
|
+
_handleCalendarBodyKeydownInYearView(event) {
|
24236
|
+
switch (event.keyCode) {
|
24237
|
+
case LEFT_ARROW:
|
24238
|
+
this._activeDate = this._adapter.addCalendarMonths(this._activeDate, -1);
|
24239
|
+
break;
|
24240
|
+
case RIGHT_ARROW:
|
24241
|
+
this._activeDate = this._adapter.addCalendarMonths(this._activeDate, 1);
|
24242
|
+
break;
|
24243
|
+
case UP_ARROW:
|
24244
|
+
this._activeDate = this._prevMonthInSameCol(this._activeDate);
|
24245
|
+
break;
|
24246
|
+
case DOWN_ARROW:
|
24247
|
+
this._activeDate = this._nextMonthInSameCol(this._activeDate);
|
24248
|
+
break;
|
24249
|
+
case HOME:
|
24250
|
+
this._activeDate = this._adapter.addCalendarMonths(this._activeDate, -this._adapter.getMonth(this._activeDate));
|
24251
|
+
break;
|
24252
|
+
case END:
|
24253
|
+
this._activeDate = this._adapter.addCalendarMonths(this._activeDate, 11 - this._adapter.getMonth(this._activeDate));
|
24254
|
+
break;
|
24255
|
+
case PAGE_UP:
|
24256
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, event.altKey ? -10 : -1);
|
24257
|
+
break;
|
24258
|
+
case PAGE_DOWN:
|
24259
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, event.altKey ? 10 : 1);
|
24260
|
+
break;
|
24261
|
+
case ENTER:
|
24262
|
+
this._monthSelected(this._activeDate);
|
24263
|
+
break;
|
24264
|
+
default:
|
24265
|
+
// Don't prevent default or focus active cell on keys that we don't explicitly handle.
|
24266
|
+
return;
|
24267
|
+
}
|
24268
|
+
// Prevent unexpected default actions such as form submission.
|
24269
|
+
event.preventDefault();
|
24270
|
+
}
|
24271
|
+
/** Handles keydown events on the calendar body when calendar is in multi-year view. */
|
24272
|
+
_handleCalendarBodyKeydownInMultiYearView(event) {
|
24273
|
+
switch (event.keyCode) {
|
24274
|
+
case LEFT_ARROW:
|
24275
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, -1);
|
24276
|
+
break;
|
24277
|
+
case RIGHT_ARROW:
|
24278
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, 1);
|
24279
|
+
break;
|
24280
|
+
case UP_ARROW:
|
24281
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, -yearsPerRow$1);
|
24282
|
+
break;
|
24283
|
+
case DOWN_ARROW:
|
24284
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, yearsPerRow$1);
|
24285
|
+
break;
|
24286
|
+
case HOME:
|
24287
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, -getActiveOffset$1(this._adapter, this._activeDate, this.minDate, this.maxDate));
|
24288
|
+
break;
|
24289
|
+
case END:
|
24290
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, yearsPerPage$2 - getActiveOffset$1(this._adapter, this._activeDate, this.minDate, this.maxDate) - 1);
|
24291
|
+
break;
|
24292
|
+
case PAGE_UP:
|
24293
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, event.altKey ? -yearsPerPage$2 * 10 : -yearsPerPage$2);
|
24294
|
+
break;
|
24295
|
+
case PAGE_DOWN:
|
24296
|
+
this._activeDate = this._adapter.addCalendarYears(this._activeDate, event.altKey ? yearsPerPage$2 * 10 : yearsPerPage$2);
|
24297
|
+
break;
|
24298
|
+
case ENTER:
|
24299
|
+
this._yearSelected(this._activeDate);
|
24300
|
+
break;
|
24301
|
+
default:
|
24302
|
+
// Don't prevent default or focus active cell on keys that we don't explicitly handle.
|
24303
|
+
return;
|
24304
|
+
}
|
24305
|
+
}
|
24306
|
+
/** Handles keydown events on the calendar body when calendar is in month view. */
|
24307
|
+
_handleCalendarBodyKeydownInClockView(event) {
|
24308
|
+
switch (event.keyCode) {
|
24309
|
+
case UP_ARROW:
|
24310
|
+
this._activeDate = this._clockView === 'hour'
|
24311
|
+
? this._adapter.addCalendarHours(this._activeDate, 1)
|
24312
|
+
: this._adapter.addCalendarMinutes(this._activeDate, 1);
|
24313
|
+
break;
|
24314
|
+
case DOWN_ARROW:
|
24315
|
+
this._activeDate = this._clockView === 'hour'
|
24316
|
+
? this._adapter.addCalendarHours(this._activeDate, -1)
|
24317
|
+
: this._adapter.addCalendarMinutes(this._activeDate, -1);
|
24318
|
+
break;
|
24319
|
+
case ENTER:
|
24320
|
+
this._timeSelected(this._activeDate);
|
24321
|
+
return;
|
24322
|
+
default:
|
24323
|
+
// Don't prevent default or focus active cell on keys that we don't explicitly handle.
|
24324
|
+
return;
|
24325
|
+
}
|
24326
|
+
// Prevent unexpected default actions such as form submission.
|
24327
|
+
event.preventDefault();
|
24328
|
+
}
|
24329
|
+
/**
|
24330
|
+
* Determine the date for the month that comes before the given month in the same column in the
|
24331
|
+
* calendar table.
|
24332
|
+
*/
|
24333
|
+
_prevMonthInSameCol(date) {
|
24334
|
+
// Determine how many months to jump forward given that there are 2 empty slots at the beginning of each year.
|
24335
|
+
const increment = this._adapter.getMonth(date) <= 4 ? -5 : this._adapter.getMonth(date) >= 7 ? -7 : -12;
|
24336
|
+
return this._adapter.addCalendarMonths(date, increment);
|
24337
|
+
}
|
24338
|
+
/**
|
24339
|
+
* Determine the date for the month that comes after the given month in the same column in the
|
24340
|
+
* calendar table.
|
24341
|
+
*/
|
24342
|
+
_nextMonthInSameCol(date) {
|
24343
|
+
// Determine how many months to jump forward given that there are 2 empty slots at the beginning of each year.
|
24344
|
+
const increment = this._adapter.getMonth(date) <= 4 ? 7 : this._adapter.getMonth(date) >= 7 ? 5 : 12;
|
24345
|
+
return this._adapter.addCalendarMonths(date, increment);
|
24346
|
+
}
|
24347
|
+
calendarState(direction) {
|
24348
|
+
this._calendarState = direction;
|
24349
|
+
}
|
24350
|
+
_2digit(n) {
|
24351
|
+
return ('00' + n).slice(-2);
|
24352
|
+
}
|
24353
|
+
};
|
24354
|
+
GIPIDatetimepickerCalendarComponent.ctorParameters = () => [
|
24355
|
+
{ type: ElementRef },
|
24356
|
+
{ type: MatDatepickerIntl$1 },
|
24357
|
+
{ type: NgZone },
|
24358
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
24359
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [GIPI_DATETIME_FORMATS,] }] },
|
24360
|
+
{ type: ChangeDetectorRef }
|
24361
|
+
];
|
24362
|
+
__decorate([
|
24363
|
+
Input(),
|
24364
|
+
__metadata("design:type", Boolean)
|
24365
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "multiYearSelector", void 0);
|
24366
|
+
__decorate([
|
24367
|
+
Input(),
|
24368
|
+
__metadata("design:type", String)
|
24369
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "startView", void 0);
|
24370
|
+
__decorate([
|
24371
|
+
Input(),
|
24372
|
+
__metadata("design:type", Boolean)
|
24373
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "twelvehour", void 0);
|
24374
|
+
__decorate([
|
24375
|
+
Input(),
|
24376
|
+
__metadata("design:type", Number)
|
24377
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "timeInterval", void 0);
|
24378
|
+
__decorate([
|
24379
|
+
Input(),
|
24380
|
+
__metadata("design:type", Function)
|
24381
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "dateFilter", void 0);
|
24382
|
+
__decorate([
|
24383
|
+
Input(),
|
24384
|
+
__metadata("design:type", Object)
|
24385
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaLabel", void 0);
|
24386
|
+
__decorate([
|
24387
|
+
Input(),
|
24388
|
+
__metadata("design:type", Object)
|
24389
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaNextMonthLabel", void 0);
|
24390
|
+
__decorate([
|
24391
|
+
Input(),
|
24392
|
+
__metadata("design:type", Object)
|
24393
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaPrevMonthLabel", void 0);
|
24394
|
+
__decorate([
|
24395
|
+
Input(),
|
24396
|
+
__metadata("design:type", Object)
|
24397
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaNextYearLabel", void 0);
|
24398
|
+
__decorate([
|
24399
|
+
Input(),
|
24400
|
+
__metadata("design:type", Object)
|
24401
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaPrevYearLabel", void 0);
|
24402
|
+
__decorate([
|
24403
|
+
Input(),
|
24404
|
+
__metadata("design:type", Object)
|
24405
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaNextMultiYearLabel", void 0);
|
24406
|
+
__decorate([
|
24407
|
+
Input(),
|
24408
|
+
__metadata("design:type", Object)
|
24409
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "ariaPrevMultiYearLabel", void 0);
|
24410
|
+
__decorate([
|
24411
|
+
Input(),
|
24412
|
+
__metadata("design:type", Object)
|
24413
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "preventSameDateTimeSelection", void 0);
|
24414
|
+
__decorate([
|
24415
|
+
Input(),
|
24416
|
+
__metadata("design:type", String),
|
24417
|
+
__metadata("design:paramtypes", [String])
|
24418
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "type", null);
|
24419
|
+
__decorate([
|
24420
|
+
Input(),
|
24421
|
+
__metadata("design:type", Object),
|
24422
|
+
__metadata("design:paramtypes", [Object])
|
24423
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "startAt", null);
|
24424
|
+
__decorate([
|
24425
|
+
Input(),
|
24426
|
+
__metadata("design:type", Object),
|
24427
|
+
__metadata("design:paramtypes", [Object])
|
24428
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "selected", null);
|
24429
|
+
__decorate([
|
24430
|
+
Input(),
|
24431
|
+
__metadata("design:type", Object),
|
24432
|
+
__metadata("design:paramtypes", [Object])
|
24433
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "minDate", null);
|
24434
|
+
__decorate([
|
24435
|
+
Input(),
|
24436
|
+
__metadata("design:type", Object),
|
24437
|
+
__metadata("design:paramtypes", [Object])
|
24438
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "maxDate", null);
|
24439
|
+
__decorate([
|
24440
|
+
Output(),
|
24441
|
+
__metadata("design:type", EventEmitter)
|
24442
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "selectedChange", void 0);
|
24443
|
+
__decorate([
|
24444
|
+
Output(),
|
24445
|
+
__metadata("design:type", EventEmitter)
|
24446
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "viewChanged", void 0);
|
24447
|
+
__decorate([
|
24448
|
+
Output(),
|
24449
|
+
__metadata("design:type", Object)
|
24450
|
+
], GIPIDatetimepickerCalendarComponent.prototype, "_userSelection", void 0);
|
24451
|
+
GIPIDatetimepickerCalendarComponent = __decorate([
|
24452
|
+
Component({
|
24453
|
+
selector: 'gipi-mat-datetime-picker-calendar',
|
24454
|
+
template: "<div class=\"gipi-mat-datetime-picker-calendar-header\">\n <div class=\"gipi-mat-datetime-picker-calendar-controls\">\n <div *ngIf=\"type !== 'time'\"\n role=\"button\"\n cdkAriaLive=\"polite\"\n class=\"gipi-mat-datetime-picker-calendar-period-button\"\n [class.active]=\"currentView === 'year' || currentView === 'multi-year'\"\n [attr.aria-label]=\"periodButtonLabel\"\n (click)=\"_yearClicked()\">\n {{ _yearLabel }}\n\n <div *ngIf=\"multiYearSelector || type === 'year'\"\n class=\"gipi-mat-datetime-picker-calendar-arrow\"\n [class.gipi-mat-datetime-picker-calendar-invert]=\"currentView != 'month'\">\n </div>\n </div>\n\n <div class=\"gipi-mat-datetime-picker-calendar-spacer\"> </div>\n\n <button mat-icon-button\n type=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-previous-button\"\n [disabled]=\"!_previousEnabled()\"\n (click)=\"_previousClicked()\"\n [attr.aria-label]=\"prevButtonLabel\">\n </button>\n\n <button mat-icon-button\n type=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-next-button\"\n [disabled]=\"!_nextEnabled()\"\n (click)=\"_nextClicked()\"\n [attr.aria-label]=\"nextButtonLabel\">\n </button>\n </div>\n\n <div class=\"gipi-mat-datetime-picker-calendar-header-date-time\">\n <span *ngIf=\"type !== 'time' && type !== 'year'\"\n role=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-header-date\"\n [class.active]=\"currentView === 'month'\"\n [class.not-clickable]=\"type === 'month'\"\n (click)=\"_dateClicked()\">\n {{ _dateLabel }}\n </span>\n <span *ngIf=\"type.endsWith('time')\"\n class=\"gipi-mat-datetime-picker-calendar-header-time\"\n [class.active]=\"currentView === 'clock'\">\n <span role=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-header-hours\"\n [class.active]=\"currentView === 'clock' && _clockView === 'hour'\"\n (click)=\"_hoursClicked()\">\n {{ _hoursLabel }}\n </span>\n :\n <span role=\"button\"\n class=\"gipi-mat-datetime-picker-calendar-header-minutes\"\n [class.active]=\"currentView === 'clock' && _clockView === 'minute'\"\n (click)=\"_minutesClicked()\">\n {{ _minutesLabel }}\n </span>\n <br />\n <span *ngIf=\"twelvehour\"\n class=\"gipi-mat-datetime-picker-calendar-header-ampm-container\">\n <span class=\"gipi-mat-datetime-picker-calendar-header-ampm\"\n [class.active]=\"currentView === 'clock' && _AMPM === 'AM'\"\n (click)=\"_ampmClicked('AM')\">\n AM\n </span>\n /\n <span class=\"gipi-mat-datetime-picker-calendar-header-ampm\"\n [class.active]=\"currentView === 'clock' && _AMPM === 'PM'\"\n (click)=\"_ampmClicked('PM')\">\n PM\n </span>\n </span>\n </span>\n </div>\n</div>\n\n<div [ngSwitch]=\"currentView\"\n class=\"gipi-mat-datetime-picker-calendar-content\">\n <!-- <div *ngIf=\"currentView === 'month' || currentView === 'year' || currentView === 'multi-year'\"\n class=\"mat-month-content\">\n <div class=\"gipi-mat-datetime-picker-calendar-controls\">\n <div (click)=\"_previousClicked()\"\n [attr.aria-disabled]=\"!_previousEnabled()\"\n [attr.aria-label]=\"_ariaLabelPrev\"\n [class.disabled]=\"!_previousEnabled()\"\n class=\"gipi-mat-datetime-picker-calendar-previous-button\"\n role=\"button\">\n <svg height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"></path>\n </svg>\n </div>\n <div (@slideCalendar.done)=\"_calendarStateDone()\"\n [@slideCalendar]=\"_calendarState\"\n class=\"gipi-mat-datetime-picker-calendar-period-button\">\n <strong>{{ _monthYearLabel }}</strong>\n </div>\n <div (click)=\"_nextClicked()\"\n [attr.aria-disabled]=\"!_nextEnabled()\"\n [attr.aria-label]=\"_ariaLabelNext\"\n [class.disabled]=\"!_nextEnabled()\"\n class=\"gipi-mat-datetime-picker-calendar-next-button\"\n role=\"button\">\n <svg height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"></path>\n </svg>\n </div>\n </div>\n </div> -->\n\n <gipi-mat-datetime-picker-month-view (_userSelection)=\"_userSelected()\"\n (selectedChange)=\"_dateSelected($event)\"\n *ngSwitchCase=\"'month'\"\n [activeDate]=\"_activeDate\"\n [dateFilter]=\"_dateFilterForViews\"\n [selected]=\"selected\"\n [type]=\"type\">\n </gipi-mat-datetime-picker-month-view>\n <gipi-mat-datetime-picker-year-view (_userSelection)=\"_userSelected()\"\n (selectedChange)=\"_monthSelected($event)\"\n *ngSwitchCase=\"'year'\"\n [activeDate]=\"_activeDate\"\n [dateFilter]=\"_dateFilterForViews\"\n [selected]=\"selected\"\n [type]=\"type\">\n </gipi-mat-datetime-picker-year-view>\n <gipi-mat-datetime-picker-multi-year-view (_userSelection)=\"_userSelected()\"\n (selectedChange)=\"_yearSelected($event)\"\n *ngSwitchCase=\"'multi-year'\"\n [activeDate]=\"_activeDate\"\n [dateFilter]=\"_dateFilterForViews\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [selected]=\"selected\"\n [type]=\"type\">\n </gipi-mat-datetime-picker-multi-year-view>\n <gipi-mat-datetime-picker-clock (_userSelection)=\"_userSelected()\"\n (activeDateChange)=\"_onActiveDateChange($event)\"\n (selectedChange)=\"_timeSelected($event)\"\n *ngSwitchDefault\n [dateFilter]=\"dateFilter\"\n [interval]=\"timeInterval\"\n [maxDate]=\"maxDate\"\n [minDate]=\"minDate\"\n [selected]=\"_activeDate\"\n [startView]=\"_clockView\"\n [twelvehour]=\"twelvehour\">\n </gipi-mat-datetime-picker-clock>\n</div>",
|
24455
|
+
animations: [slideCalendar],
|
24456
|
+
encapsulation: ViewEncapsulation.None,
|
24457
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
24458
|
+
host: {
|
24459
|
+
'[class.gipi-mat-datetime-picker-calendar]': 'true',
|
24460
|
+
'[attr.aria-label]': 'ariaLabel',
|
24461
|
+
role: 'dialog',
|
24462
|
+
tabindex: '0',
|
24463
|
+
'(keydown)': '_handleCalendarBodyKeydown($event)',
|
24464
|
+
},
|
24465
|
+
styles: [".gipi-mat-datetime-picker-calendar{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;outline:0}.gipi-mat-datetime-picker-calendar[mode=landscape]{display:flex}.gipi-mat-datetime-picker-calendar-header{padding:8px 8px 0;font-size:14px;box-sizing:border-box}[mode=landscape] .gipi-mat-datetime-picker-calendar-header{width:150px;min-width:150px}.gipi-mat-datetime-picker-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.gipi-mat-datetime-picker-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.gipi-mat-datetime-picker-calendar-spacer{flex:1 1 auto}.gipi-mat-datetime-picker-calendar-period-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:0;line-height:36px;padding:0 16px;border-radius:4px}.gipi-mat-datetime-picker-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.gipi-mat-datetime-picker-calendar-arrow.gipi-mat-datetime-picker-calendar-invert{transform:rotate(180deg)}[dir=rtl] .gipi-mat-datetime-picker-calendar-arrow{margin:0 5px 0 0}.gipi-mat-datetime-picker-calendar-next-button::after,.gipi-mat-datetime-picker-calendar-previous-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:'';margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .gipi-mat-datetime-picker-calendar-next-button,[dir=rtl] .gipi-mat-datetime-picker-calendar-previous-button{transform:rotate(180deg)}.gipi-mat-datetime-picker-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.gipi-mat-datetime-picker-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.gipi-mat-datetime-picker-calendar-header-date-time{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;margin-top:6px;font-weight:500;white-space:nowrap}[mode=landscape] .gipi-mat-datetime-picker-calendar-header-date-time{white-space:normal;word-wrap:break-word;margin-top:0}.gipi-mat-datetime-picker-calendar-header-ampm-container{font-size:.77em}.gipi-mat-datetime-picker-calendar-header-date{display:flex;align-items:center;justify-content:center;border-radius:6px;padding-inline:1rem;font-size:14px;line-height:36px;font-weight:600;transition:.2s}.gipi-mat-datetime-picker-calendar-header-date:not(.active){cursor:pointer;opacity:.6}.gipi-mat-datetime-picker-calendar-header-date:not(.active):hover{background:#f5f5f6;opacity:1}.gipi-mat-datetime-picker-calendar-header-date.active{cursor:pointer;background-color:#f3e7e7;color:#e0313e;opacity:1}.gipi-mat-datetime-picker-calendar-header-date.active:hover{background-color:#e0313e;color:#f3e7e7}.gipi-mat-datetime-picker-calendar-header-date.not-clickable{cursor:initial}.gipi-mat-datetime-picker-calendar-header-ampm,.gipi-mat-datetime-picker-calendar-header-hours,.gipi-mat-datetime-picker-calendar-header-minutes{display:flex;align-items:center;justify-content:center;border-radius:6px;width:36px;height:36px;transition:.2s}.gipi-mat-datetime-picker-calendar-header-ampm:not(.active),.gipi-mat-datetime-picker-calendar-header-hours:not(.active),.gipi-mat-datetime-picker-calendar-header-minutes:not(.active){cursor:pointer;opacity:.6}.gipi-mat-datetime-picker-calendar-header-ampm:not(.active):hover,.gipi-mat-datetime-picker-calendar-header-hours:not(.active):hover,.gipi-mat-datetime-picker-calendar-header-minutes:not(.active):hover{background:#f5f5f6;opacity:1}.gipi-mat-datetime-picker-calendar-header-ampm.active,.gipi-mat-datetime-picker-calendar-header-hours.active,.gipi-mat-datetime-picker-calendar-header-minutes.active{cursor:pointer;background-color:#f3e7e7;color:#e0313e;opacity:1}.gipi-mat-datetime-picker-calendar-header-ampm.active:hover,.gipi-mat-datetime-picker-calendar-header-hours.active:hover,.gipi-mat-datetime-picker-calendar-header-minutes.active:hover{background-color:#e0313e;color:#f3e7e7}.gipi-mat-datetime-picker-calendar-header-ampm.not-clickable,.gipi-mat-datetime-picker-calendar-header-hours.not-clickable,.gipi-mat-datetime-picker-calendar-header-minutes.not-clickable{cursor:initial}.gipi-mat-datetime-picker-calendar-header-time{display:flex;align-items:center;justify-content:center;gap:1px;font-size:24px;line-height:36px;padding-left:8px}.gipi-mat-datetime-picker-calendar-header-time:not(.active){opacity:.6}[mode=landscape] .gipi-mat-datetime-picker-calendar-header-time{display:block;padding-left:0}.gipi-mat-datetime-picker-calendar-content{width:100%;padding:0 8px 8px;outline:0;box-sizing:border-box;overflow:hidden}[mode=landscape] .gipi-mat-datetime-picker-calendar-content{padding-top:8px}.gipi-mat-datetime-picker-calendar-controls{display:flex;justify-content:space-between}.gipi-mat-datetime-picker-calendar-next-button,.gipi-mat-datetime-picker-calendar-previous-button{position:relative;display:inline-block;width:48px;height:48px;padding:12px;outline:0;border:0;cursor:pointer;background:0 0;box-sizing:border-box}.gipi-mat-datetime-picker-calendar-next-button.disabled,.gipi-mat-datetime-picker-calendar-previous-button.disabled{color:rgba(0,0,0,.38);pointer-events:none}.gipi-mat-datetime-picker-calendar-next-button svg,.gipi-mat-datetime-picker-calendar-previous-button svg{fill:currentColor;vertical-align:top}.gipi-mat-datetime-picker-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.gipi-mat-datetime-picker-calendar-table-header{color:rgba(0,0,0,.38)}.gipi-mat-datetime-picker-calendar-table-header th{text-align:center;font-size:11px;padding:0 0 8px}.gipi-mat-datetime-picker-calendar-table-header-divider{position:relative;height:1px}.gipi-mat-datetime-picker-calendar-table-header-divider::after{content:'';position:absolute;top:0;left:-8px;right:-8px;height:1px}@media (min-width:480px){.gipi-mat-datetime-picker-calendar[mode=auto]{display:flex}.gipi-mat-datetime-picker-calendar[mode=auto] .gipi-mat-datetime-picker-calendar-header{width:150px;min-width:150px}.gipi-mat-datetime-picker-calendar[mode=auto] .gipi-mat-datetime-picker-calendar-header-date-time{white-space:normal;word-wrap:break-word}.gipi-mat-datetime-picker-calendar[mode=auto] .gipi-mat-datetime-picker-calendar-header-time{display:block;padding-left:0}.gipi-mat-datetime-picker-calendar[mode=auto] .gipi-mat-datetime-picker-calendar-content{padding-top:8px}}"]
|
24466
|
+
}),
|
24467
|
+
__param(3, Optional()),
|
24468
|
+
__param(4, Optional()), __param(4, Inject(GIPI_DATETIME_FORMATS)),
|
24469
|
+
__metadata("design:paramtypes", [ElementRef,
|
24470
|
+
MatDatepickerIntl$1,
|
24471
|
+
NgZone,
|
24472
|
+
GIPIDatetimeAdapter, Object, ChangeDetectorRef])
|
24473
|
+
], GIPIDatetimepickerCalendarComponent);
|
24474
|
+
|
24475
|
+
/** Used to generate a unique ID for each datepicker instance. */
|
24476
|
+
let datetimepickerUid = 0;
|
24477
|
+
/**
|
24478
|
+
* Component used as the content for the datepicker dialog and popup. We use this instead of using
|
24479
|
+
* MatCalendar directly as the content so we can control the initial focus. This also gives us a
|
24480
|
+
* place to put additional features of the popup that are not part of the calendar itself in the
|
24481
|
+
* future. (e.g. confirmation buttons).
|
24482
|
+
* @docs-private
|
24483
|
+
*/
|
24484
|
+
let GIPIDatetimepickerContentComponent = class GIPIDatetimepickerContentComponent {
|
24485
|
+
ngAfterContentInit() {
|
24486
|
+
this._calendar._focusActiveCell();
|
24487
|
+
}
|
24488
|
+
onSelectionChange(date) {
|
24489
|
+
this.datetimepicker._select(date);
|
24490
|
+
this.datetimepicker.close();
|
24491
|
+
}
|
24492
|
+
/**
|
24493
|
+
* Handles keydown event on datepicker content.
|
24494
|
+
* @param event The event.
|
24495
|
+
*/
|
24496
|
+
_handleKeydown(event) {
|
24497
|
+
if (event.keyCode === ESCAPE) {
|
24498
|
+
this.datetimepicker.close();
|
24499
|
+
event.preventDefault();
|
24500
|
+
event.stopPropagation();
|
24501
|
+
}
|
24502
|
+
}
|
24503
|
+
};
|
24504
|
+
__decorate([
|
24505
|
+
ViewChild(GIPIDatetimepickerCalendarComponent, { static: true }),
|
24506
|
+
__metadata("design:type", GIPIDatetimepickerCalendarComponent)
|
24507
|
+
], GIPIDatetimepickerContentComponent.prototype, "_calendar", void 0);
|
24508
|
+
GIPIDatetimepickerContentComponent = __decorate([
|
24509
|
+
Component({
|
24510
|
+
selector: 'gipi-mat-datetime-picker-content',
|
24511
|
+
template: "<gipi-mat-datetime-picker-calendar cdkTrapFocus\n class=\"mat-typography\"\n [id]=\"datetimepicker.id\"\n [attr.mode]=\"datetimepicker.mode\"\n [ariaNextMonthLabel]=\"datetimepicker.ariaNextMonthLabel\"\n [ariaNextYearLabel]=\"datetimepicker.ariaNextYearLabel\"\n [ariaPrevMonthLabel]=\"datetimepicker.ariaPrevMonthLabel\"\n [ariaPrevYearLabel]=\"datetimepicker.ariaPrevYearLabel\"\n [preventSameDateTimeSelection]=\"datetimepicker.preventSameDateTimeSelection\"\n [dateFilter]=\"datetimepicker._dateFilter\"\n [maxDate]=\"datetimepicker._maxDate\"\n [minDate]=\"datetimepicker._minDate\"\n [multiYearSelector]=\"datetimepicker.multiYearSelector\"\n [selected]=\"datetimepicker._selected\"\n [startAt]=\"datetimepicker.startAt\"\n [startView]=\"datetimepicker.startView\"\n [timeInterval]=\"datetimepicker.timeInterval\"\n [twelvehour]=\"datetimepicker.twelvehour\"\n [type]=\"datetimepicker.type\"\n (_userSelection)=\"datetimepicker.close()\"\n (selectedChange)=\"onSelectionChange($event)\"\n (viewChanged)=\"datetimepicker._viewChanged($event)\">\n</gipi-mat-datetime-picker-calendar>",
|
24512
|
+
encapsulation: ViewEncapsulation.None,
|
24513
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
24514
|
+
host: {
|
24515
|
+
class: 'gipi-mat-datetime-picker-content',
|
24516
|
+
'[class.gipi-mat-datetime-picker-content-touch]': 'datetimepicker?.touchUi',
|
24517
|
+
'(keydown)': '_handleKeydown($event)',
|
24518
|
+
},
|
24519
|
+
styles: ["@use '@angular/material' as mat;.gipi-mat-datetime-picker-content{display:block;background-color:#fff;border-radius:4px!important;overflow:hidden;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.gipi-mat-datetime-picker-calendar{width:296px;height:405px}.gipi-mat-datetime-picker-calendar[mode=landscape]{width:446px;height:328px}@media (min-width:480px){.gipi-mat-datetime-picker-calendar[mode=auto]{width:446px;height:328px}}.gipi-mat-datetime-picker-content-touch{display:block;box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}.cdk-global-overlay-wrapper,.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.48}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.6)}.gipi-mat-datetime-picker-dialog .mat-dialog-container{padding:0}"]
|
24520
|
+
})
|
24521
|
+
], GIPIDatetimepickerContentComponent);
|
24522
|
+
let GIPIDatetimepickerComponent = class GIPIDatetimepickerComponent {
|
24523
|
+
constructor(_dialog, _overlay, _ngZone, _viewContainerRef, _scrollStrategy, _dateAdapter, _dir, _document) {
|
24524
|
+
this._dialog = _dialog;
|
24525
|
+
this._overlay = _overlay;
|
24526
|
+
this._ngZone = _ngZone;
|
24527
|
+
this._viewContainerRef = _viewContainerRef;
|
24528
|
+
this._scrollStrategy = _scrollStrategy;
|
24529
|
+
this._dateAdapter = _dateAdapter;
|
24530
|
+
this._dir = _dir;
|
24531
|
+
this._document = _document;
|
24532
|
+
/** Whether the calendar is open. */
|
24533
|
+
this.opened = false;
|
24534
|
+
/** The id for the datepicker calendar. */
|
24535
|
+
this.id = `gipi-mat-datetime-picker-${datetimepickerUid++}`;
|
24536
|
+
/** Emits when the datepicker is disabled. */
|
24537
|
+
this._disabledChange = new Subject();
|
24538
|
+
this._validSelected = null;
|
24539
|
+
/** The element that was focused before the datepicker was opened. */
|
24540
|
+
this._focusedElementBeforeOpen = null;
|
24541
|
+
this._inputSubscription = Subscription.EMPTY;
|
24542
|
+
/** Active multi year view when click on year. */
|
24543
|
+
this.multiYearSelector = false;
|
24544
|
+
/** if true change the clock to 12 hour format. */
|
24545
|
+
this.twelvehour = false;
|
24546
|
+
/** The view that the calendar should start in. */
|
24547
|
+
this.startView = 'month';
|
24548
|
+
this.mode = 'auto';
|
24549
|
+
this.timeInterval = 1;
|
24550
|
+
this.ariaNextMonthLabel = 'Next month';
|
24551
|
+
this.ariaPrevMonthLabel = 'Previous month';
|
24552
|
+
this.ariaNextYearLabel = 'Next year';
|
24553
|
+
this.ariaPrevYearLabel = 'Previous year';
|
24554
|
+
/** Prevent user to select same date time */
|
24555
|
+
this.preventSameDateTimeSelection = false;
|
24556
|
+
this._type = 'date';
|
24557
|
+
/** Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather than a popup and elements have more padding to allow for bigger touch targets. */
|
24558
|
+
this._touchUi = false;
|
24559
|
+
/** Emits when the datepicker has been opened. */
|
24560
|
+
this.openedStream = new EventEmitter();
|
24561
|
+
/** Emits when the datepicker has been closed. */
|
24562
|
+
this.closedStream = new EventEmitter();
|
24563
|
+
/** Emits when the view has been changed. **/
|
24564
|
+
this.viewChanged = new EventEmitter();
|
24565
|
+
/**
|
24566
|
+
* Emits new selected date when selected date changes.
|
24567
|
+
* @deprecated Switch to the `dateChange` and `dateInput` binding on the input element.
|
24568
|
+
*/
|
24569
|
+
this.selectedChanged = new EventEmitter();
|
24570
|
+
if (!this._dateAdapter) {
|
24571
|
+
throw createMissingDateImplError$1('DateAdapter');
|
24572
|
+
}
|
24573
|
+
}
|
24574
|
+
get startAt() {
|
24575
|
+
// If an explicit startAt is set we start there, otherwise we start at whatever the currently selected value is.
|
24576
|
+
return (this._startAt || (this._datepickerInput ? this._datepickerInput.value : null));
|
24577
|
+
}
|
24578
|
+
set startAt(date) {
|
24579
|
+
this._startAt = this._dateAdapter.getValidDateOrNull(date);
|
24580
|
+
}
|
24581
|
+
get openOnFocus() {
|
24582
|
+
return this._openOnFocus;
|
24583
|
+
}
|
24584
|
+
set openOnFocus(value) {
|
24585
|
+
this._openOnFocus = coerceBooleanProperty(value);
|
24586
|
+
}
|
24587
|
+
get type() {
|
24588
|
+
return this._type;
|
24589
|
+
}
|
24590
|
+
set type(value) {
|
24591
|
+
this._type = value || 'date';
|
24592
|
+
}
|
24593
|
+
get touchUi() {
|
24594
|
+
return this._touchUi;
|
24595
|
+
}
|
24596
|
+
set touchUi(value) {
|
24597
|
+
this._touchUi = coerceBooleanProperty(value);
|
24598
|
+
}
|
24599
|
+
get disabled() {
|
24600
|
+
return this._disabled === undefined && this._datepickerInput
|
24601
|
+
? this._datepickerInput.disabled
|
24602
|
+
: !!this._disabled;
|
24603
|
+
}
|
24604
|
+
set disabled(value) {
|
24605
|
+
const newValue = coerceBooleanProperty(value);
|
24606
|
+
if (newValue !== this._disabled) {
|
24607
|
+
this._disabled = newValue;
|
24608
|
+
this._disabledChange.next(newValue);
|
24609
|
+
}
|
24610
|
+
}
|
24611
|
+
/** The currently selected date. */
|
24612
|
+
get _selected() {
|
24613
|
+
return this._validSelected;
|
24614
|
+
}
|
24615
|
+
set _selected(value) {
|
24616
|
+
this._validSelected = value;
|
24617
|
+
}
|
24618
|
+
/** The minimum selectable date. */
|
24619
|
+
get _minDate() {
|
24620
|
+
return this._datepickerInput && this._datepickerInput.min;
|
24621
|
+
}
|
24622
|
+
/** The maximum selectable date. */
|
24623
|
+
get _maxDate() {
|
24624
|
+
return this._datepickerInput && this._datepickerInput.max;
|
24625
|
+
}
|
24626
|
+
get _dateFilter() {
|
24627
|
+
return this._datepickerInput && this._datepickerInput._dateFilter;
|
24628
|
+
}
|
24629
|
+
_handleFocus() {
|
24630
|
+
if (!this.opened && this.openOnFocus) {
|
24631
|
+
this.open();
|
24632
|
+
}
|
24633
|
+
}
|
24634
|
+
_viewChanged(type) {
|
24635
|
+
this.viewChanged.emit(type);
|
24636
|
+
}
|
24637
|
+
ngOnDestroy() {
|
24638
|
+
this.close();
|
24639
|
+
this._inputSubscription.unsubscribe();
|
24640
|
+
this._disabledChange.complete();
|
24641
|
+
if (this._popupRef) {
|
24642
|
+
this._popupRef.dispose();
|
24643
|
+
}
|
24644
|
+
}
|
24645
|
+
/** Selects the given date */
|
24646
|
+
_select(date) {
|
24647
|
+
const oldValue = this._selected;
|
24648
|
+
this._selected = date;
|
24649
|
+
if (!this._dateAdapter.sameDatetime(oldValue, this._selected)) {
|
24650
|
+
this.selectedChanged.emit(date);
|
24651
|
+
}
|
24652
|
+
}
|
24653
|
+
/**
|
24654
|
+
* Register an input with this datepicker.
|
24655
|
+
* @param input The datepicker input to register with this datepicker.
|
24656
|
+
*/
|
24657
|
+
_registerInput(input) {
|
24658
|
+
if (this._datepickerInput) {
|
24659
|
+
throw Error('A MatDatepicker can only be associated with a single input.');
|
24660
|
+
}
|
24661
|
+
this._datepickerInput = input;
|
24662
|
+
this._inputSubscription = this._datepickerInput._valueChange.subscribe((value) => (this._selected = value));
|
24663
|
+
}
|
24664
|
+
/** Open the calendar. */
|
24665
|
+
open() {
|
24666
|
+
if (this.opened || this.disabled) {
|
24667
|
+
return;
|
24668
|
+
}
|
24669
|
+
if (!this._datepickerInput) {
|
24670
|
+
throw Error('Attempted to open an MatDatepicker with no associated input.');
|
24671
|
+
}
|
24672
|
+
if (this._document) {
|
24673
|
+
this._focusedElementBeforeOpen = this._document.activeElement;
|
24674
|
+
}
|
24675
|
+
this.touchUi ? this._openAsDialog() : this._openAsPopup();
|
24676
|
+
this.opened = true;
|
24677
|
+
this.openedStream.emit();
|
24678
|
+
}
|
24679
|
+
/** Close the calendar. */
|
24680
|
+
close() {
|
24681
|
+
if (!this.opened) {
|
24682
|
+
return;
|
24683
|
+
}
|
24684
|
+
if (this._popupRef && this._popupRef.hasAttached()) {
|
24685
|
+
this._popupRef.detach();
|
24686
|
+
}
|
24687
|
+
if (this._dialogRef) {
|
24688
|
+
this._dialogRef.close();
|
24689
|
+
this._dialogRef = null;
|
24690
|
+
}
|
24691
|
+
if (this._calendarPortal && this._calendarPortal.isAttached) {
|
24692
|
+
this._calendarPortal.detach();
|
24693
|
+
}
|
24694
|
+
const completeClose = () => {
|
24695
|
+
// The `_opened` could've been reset already if
|
24696
|
+
// we got two events in quick succession.
|
24697
|
+
if (this.opened) {
|
24698
|
+
this.opened = false;
|
24699
|
+
this.closedStream.emit();
|
24700
|
+
this._focusedElementBeforeOpen = null;
|
24701
|
+
}
|
24702
|
+
};
|
24703
|
+
if (this._focusedElementBeforeOpen && typeof this._focusedElementBeforeOpen.focus === 'function') {
|
24704
|
+
// Because IE moves focus asynchronously, we can't count on it being restored before we've
|
24705
|
+
// marked the datepicker as closed. If the event fires out of sequence and the element that
|
24706
|
+
// we're refocusing opens the datepicker on focus, the user could be stuck with not being
|
24707
|
+
// able to close the calendar at all. We work around it by making the logic, that marks
|
24708
|
+
// the datepicker as closed, async as well.
|
24709
|
+
this._focusedElementBeforeOpen.focus();
|
24710
|
+
setTimeout(completeClose);
|
24711
|
+
}
|
24712
|
+
else {
|
24713
|
+
completeClose();
|
24714
|
+
}
|
24715
|
+
}
|
24716
|
+
/** Open the calendar as a dialog. */
|
24717
|
+
_openAsDialog() {
|
24718
|
+
this._dialogRef = this._dialog.open(GIPIDatetimepickerContentComponent, {
|
24719
|
+
direction: this._dir ? this._dir.value : 'ltr',
|
24720
|
+
viewContainerRef: this._viewContainerRef,
|
24721
|
+
panelClass: 'gipi-mat-datetime-picker-dialog',
|
24722
|
+
});
|
24723
|
+
this._dialogRef.afterClosed().subscribe(() => this.close());
|
24724
|
+
this._dialogRef.componentInstance.datetimepicker = this;
|
24725
|
+
}
|
24726
|
+
/** Open the calendar as a popup. */
|
24727
|
+
_openAsPopup() {
|
24728
|
+
if (!this._calendarPortal) {
|
24729
|
+
this._calendarPortal = new ComponentPortal(GIPIDatetimepickerContentComponent, this._viewContainerRef);
|
24730
|
+
}
|
24731
|
+
if (!this._popupRef) {
|
24732
|
+
this._createPopup();
|
24733
|
+
}
|
24734
|
+
if (!this._popupRef.hasAttached()) {
|
24735
|
+
const componentRef = this._popupRef.attach(this._calendarPortal);
|
24736
|
+
componentRef.instance.datetimepicker = this;
|
24737
|
+
// Update the position once the calendar has rendered.
|
24738
|
+
this._ngZone.onStable
|
24739
|
+
.asObservable()
|
24740
|
+
.pipe(first())
|
24741
|
+
.subscribe(() => this._popupRef.updatePosition());
|
24742
|
+
}
|
24743
|
+
this._popupRef.backdropClick().subscribe(() => this.close());
|
24744
|
+
}
|
24745
|
+
/** Create the popup. */
|
24746
|
+
_createPopup() {
|
24747
|
+
const overlayConfig = new OverlayConfig({
|
24748
|
+
positionStrategy: this._createPopupPositionStrategy(),
|
24749
|
+
hasBackdrop: true,
|
24750
|
+
backdropClass: 'mat-overlay-transparent-backdrop',
|
24751
|
+
direction: this._dir ? this._dir.value : 'ltr',
|
24752
|
+
scrollStrategy: this._scrollStrategy(),
|
24753
|
+
panelClass: 'gipi-mat-datetime-picker-popup',
|
24754
|
+
});
|
24755
|
+
this._popupRef = this._overlay.create(overlayConfig);
|
24756
|
+
}
|
24757
|
+
/** Create the popup PositionStrategy. */
|
24758
|
+
_createPopupPositionStrategy() {
|
24759
|
+
return this._overlay
|
24760
|
+
.position()
|
24761
|
+
.flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin())
|
24762
|
+
.withTransformOriginOn('.gipi-mat-datetime-picker-content')
|
24763
|
+
.withFlexibleDimensions(false)
|
24764
|
+
.withViewportMargin(8)
|
24765
|
+
.withLockedPosition()
|
24766
|
+
.withPositions([
|
24767
|
+
{
|
24768
|
+
originX: 'start',
|
24769
|
+
originY: 'bottom',
|
24770
|
+
overlayX: 'start',
|
24771
|
+
overlayY: 'top',
|
24772
|
+
},
|
24773
|
+
{
|
24774
|
+
originX: 'start',
|
24775
|
+
originY: 'top',
|
24776
|
+
overlayX: 'start',
|
24777
|
+
overlayY: 'bottom',
|
24778
|
+
},
|
24779
|
+
{
|
24780
|
+
originX: 'end',
|
24781
|
+
originY: 'bottom',
|
24782
|
+
overlayX: 'end',
|
24783
|
+
overlayY: 'top',
|
24784
|
+
},
|
24785
|
+
{
|
24786
|
+
originX: 'end',
|
24787
|
+
originY: 'top',
|
24788
|
+
overlayX: 'end',
|
24789
|
+
overlayY: 'bottom',
|
24790
|
+
},
|
24791
|
+
]);
|
24792
|
+
}
|
24793
|
+
};
|
24794
|
+
GIPIDatetimepickerComponent.ctorParameters = () => [
|
24795
|
+
{ type: MatDialog$1 },
|
24796
|
+
{ type: Overlay },
|
24797
|
+
{ type: NgZone },
|
24798
|
+
{ type: ViewContainerRef },
|
24799
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DATEPICKER_SCROLL_STRATEGY$1,] }] },
|
24800
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
24801
|
+
{ type: Directionality, decorators: [{ type: Optional }] },
|
24802
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }
|
24803
|
+
];
|
24804
|
+
__decorate([
|
24805
|
+
Input(),
|
24806
|
+
__metadata("design:type", Boolean)
|
24807
|
+
], GIPIDatetimepickerComponent.prototype, "multiYearSelector", void 0);
|
24808
|
+
__decorate([
|
24809
|
+
Input(),
|
24810
|
+
__metadata("design:type", Boolean)
|
24811
|
+
], GIPIDatetimepickerComponent.prototype, "twelvehour", void 0);
|
24812
|
+
__decorate([
|
24813
|
+
Input(),
|
24814
|
+
__metadata("design:type", String)
|
24815
|
+
], GIPIDatetimepickerComponent.prototype, "startView", void 0);
|
24816
|
+
__decorate([
|
24817
|
+
Input(),
|
24818
|
+
__metadata("design:type", String)
|
24819
|
+
], GIPIDatetimepickerComponent.prototype, "mode", void 0);
|
24820
|
+
__decorate([
|
24821
|
+
Input(),
|
24822
|
+
__metadata("design:type", Number)
|
24823
|
+
], GIPIDatetimepickerComponent.prototype, "timeInterval", void 0);
|
24824
|
+
__decorate([
|
24825
|
+
Input(),
|
24826
|
+
__metadata("design:type", Object)
|
24827
|
+
], GIPIDatetimepickerComponent.prototype, "ariaNextMonthLabel", void 0);
|
24828
|
+
__decorate([
|
24829
|
+
Input(),
|
24830
|
+
__metadata("design:type", Object)
|
24831
|
+
], GIPIDatetimepickerComponent.prototype, "ariaPrevMonthLabel", void 0);
|
24832
|
+
__decorate([
|
24833
|
+
Input(),
|
24834
|
+
__metadata("design:type", Object)
|
24835
|
+
], GIPIDatetimepickerComponent.prototype, "ariaNextYearLabel", void 0);
|
24836
|
+
__decorate([
|
24837
|
+
Input(),
|
24838
|
+
__metadata("design:type", Object)
|
24839
|
+
], GIPIDatetimepickerComponent.prototype, "ariaPrevYearLabel", void 0);
|
24840
|
+
__decorate([
|
24841
|
+
Input(),
|
24842
|
+
__metadata("design:type", Object)
|
24843
|
+
], GIPIDatetimepickerComponent.prototype, "preventSameDateTimeSelection", void 0);
|
24844
|
+
__decorate([
|
24845
|
+
Input(),
|
24846
|
+
__metadata("design:type", Object)
|
24847
|
+
], GIPIDatetimepickerComponent.prototype, "panelClass", void 0);
|
24848
|
+
__decorate([
|
24849
|
+
Input(),
|
24850
|
+
__metadata("design:type", Object),
|
24851
|
+
__metadata("design:paramtypes", [Object])
|
24852
|
+
], GIPIDatetimepickerComponent.prototype, "startAt", null);
|
24853
|
+
__decorate([
|
24854
|
+
Input(),
|
24855
|
+
__metadata("design:type", Boolean),
|
24856
|
+
__metadata("design:paramtypes", [Boolean])
|
24857
|
+
], GIPIDatetimepickerComponent.prototype, "openOnFocus", null);
|
24858
|
+
__decorate([
|
24859
|
+
Input(),
|
24860
|
+
__metadata("design:type", String),
|
24861
|
+
__metadata("design:paramtypes", [String])
|
24862
|
+
], GIPIDatetimepickerComponent.prototype, "type", null);
|
24863
|
+
__decorate([
|
24864
|
+
Input(),
|
24865
|
+
__metadata("design:type", Boolean),
|
24866
|
+
__metadata("design:paramtypes", [Boolean])
|
24867
|
+
], GIPIDatetimepickerComponent.prototype, "touchUi", null);
|
24868
|
+
__decorate([
|
24869
|
+
Input(),
|
24870
|
+
__metadata("design:type", Boolean),
|
24871
|
+
__metadata("design:paramtypes", [Boolean])
|
24872
|
+
], GIPIDatetimepickerComponent.prototype, "disabled", null);
|
24873
|
+
__decorate([
|
24874
|
+
Output('opened'),
|
24875
|
+
__metadata("design:type", EventEmitter)
|
24876
|
+
], GIPIDatetimepickerComponent.prototype, "openedStream", void 0);
|
24877
|
+
__decorate([
|
24878
|
+
Output('closed'),
|
24879
|
+
__metadata("design:type", EventEmitter)
|
24880
|
+
], GIPIDatetimepickerComponent.prototype, "closedStream", void 0);
|
24881
|
+
__decorate([
|
24882
|
+
Output(),
|
24883
|
+
__metadata("design:type", EventEmitter)
|
24884
|
+
], GIPIDatetimepickerComponent.prototype, "viewChanged", void 0);
|
24885
|
+
__decorate([
|
24886
|
+
Output(),
|
24887
|
+
__metadata("design:type", Object)
|
24888
|
+
], GIPIDatetimepickerComponent.prototype, "selectedChanged", void 0);
|
24889
|
+
GIPIDatetimepickerComponent = __decorate([
|
24890
|
+
Component({
|
24891
|
+
selector: 'gipi-mat-datetime-picker',
|
24892
|
+
exportAs: 'gipiDatetimePicker',
|
24893
|
+
template: '',
|
24894
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
24895
|
+
encapsulation: ViewEncapsulation.None,
|
24896
|
+
preserveWhitespaces: false
|
24897
|
+
}),
|
24898
|
+
__param(4, Inject(MAT_DATEPICKER_SCROLL_STRATEGY$1)),
|
24899
|
+
__param(5, Optional()),
|
24900
|
+
__param(6, Optional()),
|
24901
|
+
__param(7, Optional()), __param(7, Inject(DOCUMENT)),
|
24902
|
+
__metadata("design:paramtypes", [MatDialog$1,
|
24903
|
+
Overlay,
|
24904
|
+
NgZone,
|
24905
|
+
ViewContainerRef, Object, GIPIDatetimeAdapter,
|
24906
|
+
Directionality, Object])
|
24907
|
+
], GIPIDatetimepickerComponent);
|
24908
|
+
|
24909
|
+
let GIPIDatetimepickerToggleComponent = class GIPIDatetimepickerToggleComponent {
|
24910
|
+
constructor(_intl, _changeDetectorRef) {
|
24911
|
+
this._intl = _intl;
|
24912
|
+
this._changeDetectorRef = _changeDetectorRef;
|
24913
|
+
this._stateChanges = Subscription.EMPTY;
|
24914
|
+
}
|
24915
|
+
/** Whether the toggle button is disabled. */
|
24916
|
+
get disabled() {
|
24917
|
+
return this._disabled === undefined
|
24918
|
+
? this.datetimepicker.disabled
|
24919
|
+
: !!this._disabled;
|
24920
|
+
}
|
24921
|
+
set disabled(value) {
|
24922
|
+
this._disabled = coerceBooleanProperty(value);
|
24923
|
+
}
|
24924
|
+
ngOnChanges(changes) {
|
24925
|
+
if (changes.datepicker) {
|
24926
|
+
this._watchStateChanges();
|
24927
|
+
}
|
24928
|
+
}
|
24929
|
+
ngOnDestroy() {
|
24930
|
+
this._stateChanges.unsubscribe();
|
24931
|
+
}
|
24932
|
+
ngAfterContentInit() {
|
24933
|
+
this._watchStateChanges();
|
24934
|
+
}
|
24935
|
+
_open(event) {
|
24936
|
+
if (this.datetimepicker && !this.disabled) {
|
24937
|
+
this.datetimepicker.open();
|
24938
|
+
event.stopPropagation();
|
24939
|
+
}
|
24940
|
+
}
|
24941
|
+
_watchStateChanges() {
|
24942
|
+
const datepickerDisabled = this.datetimepicker
|
24943
|
+
? this.datetimepicker._disabledChange
|
24944
|
+
: of([], asyncScheduler);
|
24945
|
+
const inputDisabled = this.datetimepicker && this.datetimepicker._datepickerInput
|
24946
|
+
? this.datetimepicker._datepickerInput._disabledChange
|
24947
|
+
: of([], asyncScheduler);
|
24948
|
+
this._stateChanges.unsubscribe();
|
24949
|
+
this._stateChanges = merge(this._intl.changes, datepickerDisabled, inputDisabled).subscribe(() => this._changeDetectorRef.markForCheck());
|
24950
|
+
}
|
24951
|
+
};
|
24952
|
+
GIPIDatetimepickerToggleComponent.ctorParameters = () => [
|
24953
|
+
{ type: MatDatepickerIntl$1 },
|
24954
|
+
{ type: ChangeDetectorRef }
|
24955
|
+
];
|
24956
|
+
__decorate([
|
24957
|
+
Input('for'),
|
24958
|
+
__metadata("design:type", GIPIDatetimepickerComponent)
|
24959
|
+
], GIPIDatetimepickerToggleComponent.prototype, "datetimepicker", void 0);
|
24960
|
+
__decorate([
|
24961
|
+
Input(),
|
24962
|
+
__metadata("design:type", Boolean),
|
24963
|
+
__metadata("design:paramtypes", [Boolean])
|
24964
|
+
], GIPIDatetimepickerToggleComponent.prototype, "disabled", null);
|
24965
|
+
GIPIDatetimepickerToggleComponent = __decorate([
|
24966
|
+
Component({
|
24967
|
+
selector: 'gipi-mat-datetime-picker-toggle',
|
24968
|
+
exportAs: 'gipiDatetimePickerToggle',
|
24969
|
+
template: "<button [attr.aria-label]=\"_intl.openCalendarLabel\"\n [disabled]=\"disabled\"\n mat-icon-button\n type=\"button\">\n <mat-icon [ngSwitch]=\"datetimepicker.type\">\n <svg *ngSwitchCase=\"'time'\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"100%\"\n style=\"vertical-align: top\"\n viewBox=\"0 0 24 24\"\n width=\"100%\">\n <path\n d=\"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z\">\n </path>\n </svg>\n <svg *ngSwitchCase=\"'datetime'\"\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"100%\"\n style=\"vertical-align: top\"\n viewBox=\"0 0 24 24\"\n width=\"100%\">\n <path\n d=\"M15,13H16.5V15.82L18.94,17.23L18.19,18.53L15,16.69V13M19,8H5V19H9.67C9.24,18.09 9,17.07 9,16A7,7 0 0,1 16,9C17.07,9 18.09,9.24 19,9.67V8M5,21C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3H6V1H8V3H16V1H18V3H19A2,2 0 0,1 21,5V11.1C22.24,12.36 23,14.09 23,16A7,7 0 0,1 16,23C14.09,23 12.36,22.24 11.1,21H5M16,11.15A4.85,4.85 0 0,0 11.15,16C11.15,18.68 13.32,20.85 16,20.85A4.85,4.85 0 0,0 20.85,16C20.85,13.32 18.68,11.15 16,11.15Z\">\n </path>\n </svg>\n <svg *ngSwitchDefault\n fill=\"currentColor\"\n focusable=\"false\"\n height=\"100%\"\n style=\"vertical-align: top\"\n viewBox=\"0 0 24 24\"\n width=\"100%\">\n <path d=\"M0 0h24v24H0z\"\n fill=\"none\" />\n <path\n d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\" />\n </svg>\n </mat-icon>\n</button>",
|
24970
|
+
encapsulation: ViewEncapsulation.None,
|
24971
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
24972
|
+
preserveWhitespaces: false,
|
24973
|
+
host: {
|
24974
|
+
class: 'gipi-mat-datetime-picker-toggle',
|
24975
|
+
// Bind the `click` on the host, rather than the inner `button`, so that we can call `stopPropagation`
|
24976
|
+
// on it without affecting the user's `click` handlers. We need to stop it so that the input doesn't
|
24977
|
+
// get focused automatically by the form field (See https://github.com/angular/components/pull/21856).
|
24978
|
+
'(click)': '_open($event)',
|
24979
|
+
}
|
24980
|
+
}),
|
24981
|
+
__metadata("design:paramtypes", [MatDatepickerIntl$1,
|
24982
|
+
ChangeDetectorRef])
|
24983
|
+
], GIPIDatetimepickerToggleComponent);
|
24984
|
+
|
24985
|
+
var GIPIDateAndTimePickerComponent_1;
|
24986
|
+
let nextUniqueId$q = 0;
|
24987
|
+
let GIPIDateAndTimePickerComponent = GIPIDateAndTimePickerComponent_1 = class GIPIDateAndTimePickerComponent {
|
24988
|
+
constructor(elementRef, _changeDetectorRef) {
|
24989
|
+
this.elementRef = elementRef;
|
24990
|
+
this._changeDetectorRef = _changeDetectorRef;
|
24991
|
+
this._name = `gipi-mat-datetime-picker-${nextUniqueId$q++}`;
|
24992
|
+
this.id = this._name;
|
24993
|
+
this.name = this._name;
|
24994
|
+
this.label = '';
|
24995
|
+
this.placeholder = '';
|
24996
|
+
this.timeInterval = 1;
|
24997
|
+
this.help = '';
|
24998
|
+
this._required = false;
|
24999
|
+
this._disabled = false;
|
25000
|
+
this._type = 'datetime';
|
25001
|
+
this.onChange = () => { };
|
25002
|
+
this.onTouched = () => { };
|
25003
|
+
}
|
25004
|
+
get required() {
|
25005
|
+
return this._required;
|
25006
|
+
}
|
25007
|
+
set required(value) {
|
25008
|
+
this._required = coerceBooleanProperty(value);
|
25009
|
+
}
|
25010
|
+
get disabled() {
|
25011
|
+
return this._disabled;
|
25012
|
+
}
|
25013
|
+
set disabled(value) {
|
25014
|
+
this._disabled = coerceBooleanProperty(value);
|
25015
|
+
}
|
25016
|
+
get value() {
|
25017
|
+
return this._value;
|
25018
|
+
}
|
25019
|
+
set value(value) {
|
25020
|
+
if (value instanceof Date) {
|
25021
|
+
this._value = value;
|
25022
|
+
}
|
25023
|
+
else {
|
25024
|
+
this._value = new Date(value);
|
25025
|
+
}
|
25026
|
+
this.onChange(this._value);
|
25027
|
+
this.onTouched(this._value);
|
25028
|
+
}
|
25029
|
+
get type() {
|
25030
|
+
return this._type;
|
25031
|
+
}
|
25032
|
+
set type(value) {
|
25033
|
+
this._type = value || 'datetime';
|
25034
|
+
}
|
25035
|
+
ngOnInit() { }
|
25036
|
+
writeValue(value) {
|
25037
|
+
this._value = value;
|
25038
|
+
}
|
25039
|
+
registerOnChange(fn) {
|
25040
|
+
this.onChange = fn;
|
25041
|
+
}
|
25042
|
+
registerOnTouched(fn) {
|
25043
|
+
this.onTouched = fn;
|
25044
|
+
}
|
25045
|
+
setDisabledState(isDisabled) {
|
25046
|
+
this.disabled = isDisabled;
|
25047
|
+
this._changeDetectorRef.markForCheck();
|
25048
|
+
}
|
25049
|
+
toggleDatetimePicker(event) {
|
25050
|
+
if (!ObjectUtil.isNull(this.GIPIDatetimepickerToggleRef)) {
|
25051
|
+
this.GIPIDatetimepickerToggleRef._open(event);
|
25052
|
+
}
|
25053
|
+
}
|
25054
|
+
};
|
25055
|
+
GIPIDateAndTimePickerComponent.ctorParameters = () => [
|
25056
|
+
{ type: ElementRef },
|
25057
|
+
{ type: ChangeDetectorRef }
|
25058
|
+
];
|
25059
|
+
__decorate([
|
25060
|
+
ViewChild('dateTimePickerToggle', { static: true }),
|
25061
|
+
__metadata("design:type", GIPIDatetimepickerToggleComponent)
|
25062
|
+
], GIPIDateAndTimePickerComponent.prototype, "GIPIDatetimepickerToggleRef", void 0);
|
25063
|
+
__decorate([
|
25064
|
+
Input(),
|
25065
|
+
__metadata("design:type", String)
|
25066
|
+
], GIPIDateAndTimePickerComponent.prototype, "id", void 0);
|
25067
|
+
__decorate([
|
25068
|
+
Input(),
|
25069
|
+
__metadata("design:type", String)
|
25070
|
+
], GIPIDateAndTimePickerComponent.prototype, "name", void 0);
|
25071
|
+
__decorate([
|
25072
|
+
Input(),
|
25073
|
+
__metadata("design:type", String)
|
25074
|
+
], GIPIDateAndTimePickerComponent.prototype, "label", void 0);
|
25075
|
+
__decorate([
|
25076
|
+
Input(),
|
25077
|
+
__metadata("design:type", String)
|
25078
|
+
], GIPIDateAndTimePickerComponent.prototype, "placeholder", void 0);
|
25079
|
+
__decorate([
|
25080
|
+
Input('min'),
|
25081
|
+
__metadata("design:type", Date)
|
25082
|
+
], GIPIDateAndTimePickerComponent.prototype, "minDate", void 0);
|
25083
|
+
__decorate([
|
25084
|
+
Input('max'),
|
25085
|
+
__metadata("design:type", Date)
|
25086
|
+
], GIPIDateAndTimePickerComponent.prototype, "maxDate", void 0);
|
25087
|
+
__decorate([
|
25088
|
+
Input(),
|
25089
|
+
__metadata("design:type", Number)
|
25090
|
+
], GIPIDateAndTimePickerComponent.prototype, "timeInterval", void 0);
|
25091
|
+
__decorate([
|
25092
|
+
Input(),
|
25093
|
+
__metadata("design:type", String)
|
25094
|
+
], GIPIDateAndTimePickerComponent.prototype, "help", void 0);
|
25095
|
+
__decorate([
|
25096
|
+
Input(),
|
25097
|
+
__metadata("design:type", Boolean),
|
25098
|
+
__metadata("design:paramtypes", [Boolean])
|
25099
|
+
], GIPIDateAndTimePickerComponent.prototype, "required", null);
|
25100
|
+
__decorate([
|
25101
|
+
Input(),
|
25102
|
+
__metadata("design:type", Boolean),
|
25103
|
+
__metadata("design:paramtypes", [Boolean])
|
25104
|
+
], GIPIDateAndTimePickerComponent.prototype, "disabled", null);
|
25105
|
+
__decorate([
|
25106
|
+
Input(),
|
25107
|
+
__metadata("design:type", Object),
|
25108
|
+
__metadata("design:paramtypes", [Object])
|
25109
|
+
], GIPIDateAndTimePickerComponent.prototype, "value", null);
|
25110
|
+
__decorate([
|
25111
|
+
Input(),
|
25112
|
+
__metadata("design:type", String),
|
25113
|
+
__metadata("design:paramtypes", [String])
|
25114
|
+
], GIPIDateAndTimePickerComponent.prototype, "type", null);
|
25115
|
+
GIPIDateAndTimePickerComponent = GIPIDateAndTimePickerComponent_1 = __decorate([
|
25116
|
+
Component({
|
25117
|
+
selector: 'gipi-datetime-picker',
|
25118
|
+
exportAs: 'gipiDatetimePicker',
|
25119
|
+
template: "<div class=\"datetime-wrapper\">\n\n <label *ngIf=\"label\"\n class=\"datetime-label\"\n [attr.for]=\"id\">\n {{ label }}\n <span *ngIf=\"required\"> * </span>\n </label>\n\n <div class=\"datetime-content\">\n\n <input inputRef\n class=\"datetime-element\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [placeholder]=\"placeholder\"\n [min]=\"minDate\"\n [max]=\"maxDate\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [readOnly]=\"true\"\n [autocomplete]=\"'off'\"\n [(ngModel)]=\"value\"\n [value]=\"value\"\n [gipiMatDatetimePicker]=\"datetimePicker\"\n (click)=\"toggleDatetimePicker($event)\" />\n\n <div class=\"suffix\">\n <gipi-mat-datetime-picker-toggle #dateTimePickerToggle\n [for]=\"datetimePicker\">\n </gipi-mat-datetime-picker-toggle>\n </div>\n\n <gipi-mat-datetime-picker #datetimePicker\n [openOnFocus]=\"false\"\n [mode]=\"'portrait'\"\n [multiYearSelector]=\"true\"\n [disabled]=\"disabled\"\n [timeInterval]=\"timeInterval\"\n [type]=\"type\">\n </gipi-mat-datetime-picker>\n </div>\n\n <small *ngIf=\"help\"\n class=\"datetime-help\">\n {{ help }}\n </small>\n</div>",
|
25120
|
+
providers: [
|
25121
|
+
{
|
25122
|
+
provide: NG_VALUE_ACCESSOR,
|
25123
|
+
useExisting: forwardRef(() => GIPIDateAndTimePickerComponent_1),
|
25124
|
+
multi: true
|
25125
|
+
},
|
25126
|
+
],
|
25127
|
+
host: {
|
25128
|
+
'class': 'gipi-mat-datetime-picker',
|
25129
|
+
},
|
25130
|
+
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.datetime-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.datetime-wrapper .datetime-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.datetime-wrapper .datetime-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.datetime-wrapper .datetime-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:6px;cursor:pointer}.datetime-wrapper .datetime-content .datetime-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0;cursor:pointer}.datetime-wrapper .datetime-content:not(.datetime-element:disabled):has(.datetime-element:enabled:hover),.datetime-wrapper .datetime-content:not(.datetime-element:disabled):has(.suffix:hover){border-color:#6d6f73}.datetime-wrapper .datetime-content:not(.datetime-element:disabled):has(.datetime-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.datetime-wrapper .datetime-content:has(.datetime-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.datetime-wrapper .datetime-content .datetime-element:disabled{cursor:not-allowed}.datetime-wrapper .datetime-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.datetime-wrapper .datetime-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .gipi-mat-datetime-picker-toggle{width:2rem!important;height:2rem!important;line-height:2rem!important}::ng-deep .gipi-mat-datetime-picker-toggle>button{width:2rem!important;height:2rem!important;line-height:2rem!important}::ng-deep .gipi-mat-datetime-picker-toggle>button .mat-button-wrapper>mat-icon{width:2rem!important;height:2rem!important;font-size:2rem!important;line-height:2rem!important;color:#696969!important}::ng-deep .gipi-mat-datetime-picker-toggle>button .mat-button-focus-overlay,::ng-deep .gipi-mat-datetime-picker-toggle>button .mat-button-ripple{display:none!important}::ng-deep .gipi-mat-datetime-picker-content{border-radius:6px!important}::ng-deep .gipi-mat-datetime-picker-calendar-header{border-top-left-radius:6px!important;border-top-right-radius:6px!important}::ng-deep .gipi-mat-datetime-picker-calendar-body-active>.gipi-mat-datetime-picker-calendar-body-cell-content:not(.gipi-mat-datetime-picker-calendar-body-selected){background-color:#f3e7e7!important;color:#e0313e!important}::ng-deep .gipi-mat-datetime-picker-calendar-body-cell .gipi-mat-datetime-picker-calendar-body-today{border-color:#e0313e!important}::ng-deep .gipi-mat-datetime-picker-calendar-body-cell .gipi-mat-datetime-picker-calendar-body-today.gipi-mat-datetime-picker-calendar-body-selected{box-shadow:inset 0 0 0 1px #fff!important}::ng-deep .gipi-mat-datetime-picker-calendar-body-cell .gipi-mat-datetime-picker-calendar-body-selected{background-color:#e0313e!important;color:#fff!important}::ng-deep .gipi-mat-datetime-picker-clock{background-color:#f5f5f6!important}::ng-deep .gipi-mat-datetime-picker-clock-center,::ng-deep .gipi-mat-datetime-picker-clock-hand,::ng-deep .gipi-mat-datetime-picker-clock-hand::before{background-color:#e0313e!important}::ng-deep .gipi-mat-datetime-picker-clock-cell.gipi-mat-datetime-picker-clock-cell-selected{color:#fff!important;background-color:#e0313e!important}::-webkit-input-placeholder{color:#bbbdc1}:-moz-placeholder{color:#bbbdc1}::-moz-placeholder{color:#bbbdc1}:-ms-input-placeholder{color:#bbbdc1}"]
|
25131
|
+
}),
|
25132
|
+
__metadata("design:paramtypes", [ElementRef,
|
25133
|
+
ChangeDetectorRef])
|
25134
|
+
], GIPIDateAndTimePickerComponent);
|
25135
|
+
|
25136
|
+
const CLOCK_RADIUS = 50;
|
25137
|
+
const CLOCK_INNER_RADIUS = 27.5;
|
25138
|
+
const CLOCK_OUTER_RADIUS = 41.25;
|
25139
|
+
const CLOCK_TICK_RADIUS = 7.0833;
|
25140
|
+
/**
|
25141
|
+
* A clock that is used as part of the datepicker.
|
25142
|
+
* @docs-private
|
25143
|
+
*/
|
25144
|
+
let GIPIDatetimepickerClockComponent = class GIPIDatetimepickerClockComponent {
|
25145
|
+
constructor(_element, _adapter) {
|
25146
|
+
this._element = _element;
|
25147
|
+
this._adapter = _adapter;
|
25148
|
+
/** Hours and Minutes representing the clock view. */
|
25149
|
+
this._hours = [];
|
25150
|
+
this._minutes = [];
|
25151
|
+
/** Whether the clock is in hour view. */
|
25152
|
+
this._hourView = true;
|
25153
|
+
this._timeChanged = false;
|
25154
|
+
this.interval = 1;
|
25155
|
+
this.twelvehour = false;
|
25156
|
+
/** Emits when the currently selected date changes. */
|
25157
|
+
this.selectedChange = new EventEmitter();
|
25158
|
+
this.activeDateChange = new EventEmitter();
|
25159
|
+
this._userSelection = new EventEmitter();
|
25160
|
+
this.mouseMoveListener = (event) => this._handleMousemove(event);
|
25161
|
+
this.mouseUpListener = () => this._handleMouseup();
|
25162
|
+
}
|
25163
|
+
get activeDate() {
|
25164
|
+
return this._activeDate;
|
25165
|
+
}
|
25166
|
+
set activeDate(value) {
|
25167
|
+
let oldActiveDate = this._activeDate;
|
25168
|
+
this._activeDate = this._adapter.clampDate(value, this.minDate, this.maxDate);
|
25169
|
+
if (!this._adapter.sameMinute(oldActiveDate, this._activeDate)) {
|
25170
|
+
this._init();
|
25171
|
+
}
|
25172
|
+
}
|
25173
|
+
get selected() {
|
25174
|
+
return this._selected;
|
25175
|
+
}
|
25176
|
+
set selected(value) {
|
25177
|
+
this._selected = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
|
25178
|
+
if (this._selected) {
|
25179
|
+
this.activeDate = this._selected;
|
25180
|
+
}
|
25181
|
+
}
|
25182
|
+
get minDate() {
|
25183
|
+
return this._minDate;
|
25184
|
+
}
|
25185
|
+
set minDate(value) {
|
25186
|
+
this._minDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
|
25187
|
+
}
|
25188
|
+
get maxDate() {
|
25189
|
+
return this._maxDate;
|
25190
|
+
}
|
25191
|
+
set maxDate(value) {
|
25192
|
+
this._maxDate = this._adapter.getValidDateOrNull(this._adapter.deserialize(value));
|
25193
|
+
}
|
25194
|
+
/** Whether the clock should be started in hour or minute view. */
|
25195
|
+
set startView(value) {
|
25196
|
+
this._hourView = value != 'minute';
|
25197
|
+
}
|
25198
|
+
get _hand() {
|
25199
|
+
let hour = this._adapter.getHour(this.activeDate);
|
25200
|
+
if (!!this.twelvehour) {
|
25201
|
+
if (hour === 0) {
|
25202
|
+
hour = 24;
|
25203
|
+
}
|
25204
|
+
this._selectedHour = hour > 12 ? hour - 12 : hour;
|
25205
|
+
}
|
25206
|
+
else {
|
25207
|
+
this._selectedHour = hour;
|
25208
|
+
}
|
25209
|
+
this._selectedMinute = this._adapter.getMinute(this.activeDate);
|
25210
|
+
let deg = 0;
|
25211
|
+
let radius = CLOCK_OUTER_RADIUS;
|
25212
|
+
if (this._hourView) {
|
25213
|
+
let outer = this._selectedHour > 0 && this._selectedHour < 13;
|
25214
|
+
radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;
|
25215
|
+
if (this.twelvehour) {
|
25216
|
+
radius = CLOCK_OUTER_RADIUS;
|
25217
|
+
}
|
25218
|
+
deg = Math.round(this._selectedHour * (360 / (24 / 2)));
|
25219
|
+
}
|
25220
|
+
else {
|
25221
|
+
deg = Math.round(this._selectedMinute * (360 / 60));
|
25222
|
+
}
|
25223
|
+
return {
|
25224
|
+
transform: `rotate(${deg}deg)`,
|
25225
|
+
height: `${radius}%`,
|
25226
|
+
'margin-top': `${50 - radius}%`,
|
25227
|
+
};
|
25228
|
+
}
|
25229
|
+
ngAfterContentInit() {
|
25230
|
+
this.activeDate = this._activeDate || this._adapter.today();
|
25231
|
+
this._init();
|
25232
|
+
}
|
25233
|
+
/** Handles mousedown events on the clock body. */
|
25234
|
+
_handleMousedown(event) {
|
25235
|
+
this._timeChanged = false;
|
25236
|
+
this.setTime(event);
|
25237
|
+
document.addEventListener('mousemove', this.mouseMoveListener);
|
25238
|
+
document.addEventListener('touchmove', this.mouseMoveListener);
|
25239
|
+
document.addEventListener('mouseup', this.mouseUpListener);
|
25240
|
+
document.addEventListener('touchend', this.mouseUpListener);
|
25241
|
+
}
|
25242
|
+
_handleMousemove(event) {
|
25243
|
+
event.preventDefault();
|
25244
|
+
this.setTime(event);
|
25245
|
+
}
|
25246
|
+
_handleMouseup() {
|
25247
|
+
document.removeEventListener('mousemove', this.mouseMoveListener);
|
25248
|
+
document.removeEventListener('touchmove', this.mouseMoveListener);
|
25249
|
+
document.removeEventListener('mouseup', this.mouseUpListener);
|
25250
|
+
document.removeEventListener('touchend', this.mouseUpListener);
|
25251
|
+
if (this._timeChanged) {
|
25252
|
+
this.selectedChange.emit(this.activeDate);
|
25253
|
+
if (!this._hourView) {
|
25254
|
+
this._userSelection.emit();
|
25255
|
+
}
|
25256
|
+
}
|
25257
|
+
}
|
25258
|
+
/** Initializes this clock view. */
|
25259
|
+
_init() {
|
25260
|
+
this._hours.length = 0;
|
25261
|
+
this._minutes.length = 0;
|
25262
|
+
let hourNames = this._adapter.getHourNames();
|
25263
|
+
let minuteNames = this._adapter.getMinuteNames();
|
25264
|
+
if (this.twelvehour) {
|
25265
|
+
for (let i = 1; i < hourNames.length / 2 + 1; i++) {
|
25266
|
+
let radian = (i / 6) * Math.PI;
|
25267
|
+
let radius = CLOCK_OUTER_RADIUS;
|
25268
|
+
const date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), i + 1, 0);
|
25269
|
+
let enabled = (!this.minDate || this._adapter.compareDatetime(date, this.minDate) >= 0) &&
|
25270
|
+
(!this.maxDate || this._adapter.compareDatetime(date, this.maxDate) <= 0);
|
25271
|
+
this._hours.push({
|
25272
|
+
value: i,
|
25273
|
+
displayValue: i === 0 ? '00' : hourNames[i],
|
25274
|
+
enabled: enabled,
|
25275
|
+
top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,
|
25276
|
+
left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS,
|
25277
|
+
});
|
25278
|
+
}
|
25279
|
+
}
|
25280
|
+
else {
|
25281
|
+
for (let i = 0; i < hourNames.length; i++) {
|
25282
|
+
let radian = (i / 6) * Math.PI;
|
25283
|
+
let outer = i > 0 && i < 13, radius = outer ? CLOCK_OUTER_RADIUS : CLOCK_INNER_RADIUS;
|
25284
|
+
const date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), i, 0);
|
25285
|
+
let enabled = (!this.minDate || this._adapter.compareDatetime(date, this.minDate, false) >= 0) &&
|
25286
|
+
(!this.maxDate || this._adapter.compareDatetime(date, this.maxDate, false) <= 0) &&
|
25287
|
+
(!this.dateFilter || this.dateFilter(date, GIPIDatetimepickerFilterType.HOUR));
|
25288
|
+
this._hours.push({
|
25289
|
+
value: i,
|
25290
|
+
displayValue: i === 0 ? '00' : hourNames[i],
|
25291
|
+
enabled: enabled,
|
25292
|
+
top: CLOCK_RADIUS - Math.cos(radian) * radius - CLOCK_TICK_RADIUS,
|
25293
|
+
left: CLOCK_RADIUS + Math.sin(radian) * radius - CLOCK_TICK_RADIUS,
|
25294
|
+
fontSize: i > 0 && i < 13 ? '' : '80%',
|
25295
|
+
});
|
25296
|
+
}
|
25297
|
+
}
|
25298
|
+
for (let i = 0; i < minuteNames.length; i += 5) {
|
25299
|
+
let radian = (i / 30) * Math.PI;
|
25300
|
+
const date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), i);
|
25301
|
+
let enabled = (!this.minDate || this._adapter.compareDatetime(date, this.minDate) >= 0) &&
|
25302
|
+
(!this.maxDate || this._adapter.compareDatetime(date, this.maxDate) <= 0) &&
|
25303
|
+
(!this.dateFilter || this.dateFilter(date, GIPIDatetimepickerFilterType.MINUTE));
|
25304
|
+
this._minutes.push({
|
25305
|
+
value: i,
|
25306
|
+
displayValue: i === 0 ? '00' : minuteNames[i],
|
25307
|
+
enabled: enabled,
|
25308
|
+
top: CLOCK_RADIUS - Math.cos(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS,
|
25309
|
+
left: CLOCK_RADIUS + Math.sin(radian) * CLOCK_OUTER_RADIUS - CLOCK_TICK_RADIUS,
|
25310
|
+
});
|
25311
|
+
}
|
25312
|
+
}
|
25313
|
+
/**
|
25314
|
+
* Set Time
|
25315
|
+
* @param event
|
25316
|
+
*/
|
25317
|
+
setTime(event) {
|
25318
|
+
var _a, _b;
|
25319
|
+
let trigger = this._element.nativeElement;
|
25320
|
+
let triggerRect = trigger.getBoundingClientRect();
|
25321
|
+
let width = trigger.offsetWidth;
|
25322
|
+
let height = trigger.offsetHeight;
|
25323
|
+
let pageX = event.pageX !== undefined ? event.pageX : event.touches[0].pageX;
|
25324
|
+
let pageY = event.pageY !== undefined ? event.pageY : event.touches[0].pageY;
|
25325
|
+
let x = width / 2 - (pageX - triggerRect.left - window.pageXOffset);
|
25326
|
+
let y = height / 2 - (pageY - triggerRect.top - window.pageYOffset);
|
25327
|
+
let radian = Math.atan2(-x, y);
|
25328
|
+
let unit = Math.PI / (this._hourView ? 6 : this.interval ? 30 / this.interval : 30);
|
25329
|
+
let z = Math.sqrt(x * x + y * y);
|
25330
|
+
let outer = this._hourView && z > (width * (CLOCK_OUTER_RADIUS / 100) + width * (CLOCK_INNER_RADIUS / 100)) / 2;
|
25331
|
+
if (radian < 0) {
|
25332
|
+
radian = Math.PI * 2 + radian;
|
25333
|
+
}
|
25334
|
+
let value = Math.round(radian / unit);
|
25335
|
+
let date;
|
25336
|
+
if (this._hourView) {
|
25337
|
+
if (this.twelvehour) {
|
25338
|
+
value = value === 0 ? 12 : value;
|
25339
|
+
}
|
25340
|
+
else {
|
25341
|
+
if (value === 12) {
|
25342
|
+
value = 0;
|
25343
|
+
}
|
25344
|
+
value = outer ? value === 0 ? 12 : value : value === 0 ? 0 : value + 12;
|
25345
|
+
}
|
25346
|
+
// Don't close the hours view if an invalid hour is clicked.
|
25347
|
+
if (!((_a = this._hours.find((h) => (h === null || h === void 0 ? void 0 : h['value']) === value)) === null || _a === void 0 ? void 0 : _a['enabled'])) {
|
25348
|
+
return;
|
25349
|
+
}
|
25350
|
+
date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), value, this._adapter.getMinute(this.activeDate));
|
25351
|
+
}
|
25352
|
+
else {
|
25353
|
+
if (this.interval) {
|
25354
|
+
value *= this.interval;
|
25355
|
+
}
|
25356
|
+
if (value === 60) {
|
25357
|
+
value = 0;
|
25358
|
+
}
|
25359
|
+
// Don't close the minutes view if an invalid minute is clicked.
|
25360
|
+
if (!((_b = this._minutes.find((m) => (m === null || m === void 0 ? void 0 : m['value']) === value)) === null || _b === void 0 ? void 0 : _b['enabled'])) {
|
25361
|
+
return;
|
25362
|
+
}
|
25363
|
+
date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), this._adapter.getDate(this.activeDate), this._adapter.getHour(this.activeDate), value);
|
25364
|
+
}
|
25365
|
+
this._timeChanged = true;
|
25366
|
+
this.activeDate = date;
|
25367
|
+
this.activeDateChange.emit(this.activeDate);
|
25368
|
+
}
|
25369
|
+
};
|
25370
|
+
GIPIDatetimepickerClockComponent.ctorParameters = () => [
|
25371
|
+
{ type: ElementRef },
|
25372
|
+
{ type: GIPIDatetimeAdapter }
|
25373
|
+
];
|
25374
|
+
__decorate([
|
25375
|
+
Input(),
|
25376
|
+
__metadata("design:type", Function)
|
25377
|
+
], GIPIDatetimepickerClockComponent.prototype, "dateFilter", void 0);
|
25378
|
+
__decorate([
|
25379
|
+
Input(),
|
25380
|
+
__metadata("design:type", Number)
|
25381
|
+
], GIPIDatetimepickerClockComponent.prototype, "interval", void 0);
|
25382
|
+
__decorate([
|
25383
|
+
Input(),
|
25384
|
+
__metadata("design:type", Boolean)
|
25385
|
+
], GIPIDatetimepickerClockComponent.prototype, "twelvehour", void 0);
|
25386
|
+
__decorate([
|
25387
|
+
Input(),
|
25388
|
+
__metadata("design:type", Object),
|
25389
|
+
__metadata("design:paramtypes", [Object])
|
25390
|
+
], GIPIDatetimepickerClockComponent.prototype, "activeDate", null);
|
25391
|
+
__decorate([
|
25392
|
+
Input(),
|
25393
|
+
__metadata("design:type", Object),
|
25394
|
+
__metadata("design:paramtypes", [Object])
|
25395
|
+
], GIPIDatetimepickerClockComponent.prototype, "selected", null);
|
25396
|
+
__decorate([
|
25397
|
+
Input(),
|
25398
|
+
__metadata("design:type", Object),
|
25399
|
+
__metadata("design:paramtypes", [Object])
|
25400
|
+
], GIPIDatetimepickerClockComponent.prototype, "minDate", null);
|
25401
|
+
__decorate([
|
25402
|
+
Input(),
|
25403
|
+
__metadata("design:type", Object),
|
25404
|
+
__metadata("design:paramtypes", [Object])
|
25405
|
+
], GIPIDatetimepickerClockComponent.prototype, "maxDate", null);
|
25406
|
+
__decorate([
|
25407
|
+
Input(),
|
25408
|
+
__metadata("design:type", String),
|
25409
|
+
__metadata("design:paramtypes", [String])
|
25410
|
+
], GIPIDatetimepickerClockComponent.prototype, "startView", null);
|
25411
|
+
__decorate([
|
25412
|
+
Output(),
|
25413
|
+
__metadata("design:type", Object)
|
25414
|
+
], GIPIDatetimepickerClockComponent.prototype, "selectedChange", void 0);
|
25415
|
+
__decorate([
|
25416
|
+
Output(),
|
25417
|
+
__metadata("design:type", Object)
|
25418
|
+
], GIPIDatetimepickerClockComponent.prototype, "activeDateChange", void 0);
|
25419
|
+
__decorate([
|
25420
|
+
Output(),
|
25421
|
+
__metadata("design:type", Object)
|
25422
|
+
], GIPIDatetimepickerClockComponent.prototype, "_userSelection", void 0);
|
25423
|
+
GIPIDatetimepickerClockComponent = __decorate([
|
25424
|
+
Component({
|
25425
|
+
selector: 'gipi-mat-datetime-picker-clock',
|
25426
|
+
template: "<div class=\"gipi-mat-datetime-picker-clock\">\n <div class=\"gipi-mat-datetime-picker-clock-center\"></div>\n <div [ngStyle]=\"_hand\"\n class=\"gipi-mat-datetime-picker-clock-hand\"></div>\n <div [class.active]=\"_hourView\"\n class=\"gipi-mat-datetime-picker-clock-hours\">\n <div *ngFor=\"let item of _hours\"\n [class.gipi-mat-datetime-picker-clock-cell-disabled]=\"!item.enabled\"\n [class.gipi-mat-datetime-picker-clock-cell-selected]=\"_selectedHour === item.value\"\n [style.fontSize]=\"item.fontSize\"\n [style.left]=\"item.left + '%'\"\n [style.top]=\"item.top + '%'\"\n class=\"gipi-mat-datetime-picker-clock-cell\">\n {{ item.displayValue }}\n </div>\n </div>\n <div [class.active]=\"!_hourView\"\n class=\"gipi-mat-datetime-picker-clock-minutes\">\n <div *ngFor=\"let item of _minutes\"\n [class.gipi-mat-datetime-picker-clock-cell-disabled]=\"!item.enabled\"\n [class.gipi-mat-datetime-picker-clock-cell-selected]=\"_selectedMinute === item.value\"\n [style.left]=\"item.left + '%'\"\n [style.top]=\"item.top + '%'\"\n class=\"gipi-mat-datetime-picker-clock-cell\">\n {{ item.displayValue }}\n </div>\n </div>\n</div>",
|
25427
|
+
host: {
|
25428
|
+
role: 'clock',
|
25429
|
+
'(mousedown)': '_handleMousedown($event)',
|
25430
|
+
},
|
25431
|
+
styles: [":host{position:relative;display:block;min-width:224px;margin:8px;font-size:14px;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gipi-mat-datetime-picker-clock{position:relative;width:100%;height:0;padding-top:100%;background-color:#e0e0e0;border-radius:50%}.gipi-mat-datetime-picker-clock-center{position:absolute;top:50%;left:50%;width:2%;height:2%;margin:-1%;border-radius:50%}.gipi-mat-datetime-picker-clock-hand{position:absolute;top:0;right:0;bottom:0;left:0;width:1px;margin:0 auto;transform-origin:bottom}.gipi-mat-datetime-picker-clock-hand::before{content:'';position:absolute;top:-4px;left:-4px;width:8px;height:8px;border-radius:50%}.gipi-mat-datetime-picker-clock-hours,.gipi-mat-datetime-picker-clock-minutes{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;visibility:hidden;transition:350ms;transform:scale(1.2)}.gipi-mat-datetime-picker-clock-hours.active,.gipi-mat-datetime-picker-clock-minutes.active{opacity:1;visibility:visible;transform:scale(1)}.gipi-mat-datetime-picker-clock-minutes{transform:scale(.8)}.gipi-mat-datetime-picker-clock-cell{position:absolute;display:flex;width:14.1666%;height:14.1666%;color:rgba(0,0,0,.87);justify-content:center;box-sizing:border-box;border-radius:50%;align-items:center;cursor:pointer}.gipi-mat-datetime-picker-clock-cell:not(.gipi-mat-datetime-picker-clock-cell-selected):not(.gipi-mat-datetime-picker-clock-cell-disabled):hover{background-color:rgba(0,0,0,.1)}.gipi-mat-datetime-picker-clock-cell.gipi-mat-datetime-picker-clock-cell-disabled{color:rgba(0,0,0,.38);pointer-events:none}.gipi-mat-datetime-picker-clock-cell.gipi-mat-datetime-picker-clock-cell-selected{color:#fff}"]
|
25432
|
+
}),
|
25433
|
+
__metadata("design:paramtypes", [ElementRef,
|
25434
|
+
GIPIDatetimeAdapter])
|
25435
|
+
], GIPIDatetimepickerClockComponent);
|
25436
|
+
|
25437
|
+
var GIPIDatetimepickerInputDirective_1;
|
25438
|
+
const GIPI_DATETIMEPICKER_VALUE_ACCESSOR = {
|
25439
|
+
provide: NG_VALUE_ACCESSOR,
|
25440
|
+
useExisting: forwardRef(() => GIPIDatetimepickerInputDirective),
|
25441
|
+
multi: true,
|
25442
|
+
};
|
25443
|
+
const GIPI_DATETIMEPICKER_VALIDATORS = {
|
25444
|
+
provide: NG_VALIDATORS,
|
25445
|
+
useExisting: forwardRef(() => GIPIDatetimepickerInputDirective),
|
25446
|
+
multi: true,
|
25447
|
+
};
|
25448
|
+
/**
|
25449
|
+
* An event used for datepicker input and change events. We don't always have access to a native
|
25450
|
+
* input or change event because the event may have been triggered by the user clicking on the
|
25451
|
+
* calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
|
25452
|
+
*/
|
25453
|
+
class GIPIDatetimepickerInputEvent {
|
25454
|
+
constructor(target, targetElement) {
|
25455
|
+
this.target = target;
|
25456
|
+
this.targetElement = targetElement;
|
25457
|
+
this.value = this.target.value;
|
25458
|
+
}
|
25459
|
+
}
|
25460
|
+
/** Directive used to connect an input to a MatDatepicker. */
|
25461
|
+
let GIPIDatetimepickerInputDirective = GIPIDatetimepickerInputDirective_1 = class GIPIDatetimepickerInputDirective {
|
25462
|
+
constructor(_elementRef, _dateAdapter, _dateFormats, _formField) {
|
25463
|
+
this._elementRef = _elementRef;
|
25464
|
+
this._dateAdapter = _dateAdapter;
|
25465
|
+
this._dateFormats = _dateFormats;
|
25466
|
+
this._formField = _formField;
|
25467
|
+
/** Emits when the value changes (either due to user input or programmatic change). */
|
25468
|
+
this._valueChange = new EventEmitter();
|
25469
|
+
/** Emits when the disabled state has changed */
|
25470
|
+
this._disabledChange = new EventEmitter();
|
25471
|
+
this._datepickerSubscription = Subscription.EMPTY;
|
25472
|
+
this._localeSubscription = Subscription.EMPTY;
|
25473
|
+
/** Whether the last value set on the input was valid. */
|
25474
|
+
this._lastValueValid = false;
|
25475
|
+
/** Emits when a `change` event is fired on this `<input>`. */
|
25476
|
+
this.dateChange = new EventEmitter();
|
25477
|
+
/** Emits when an `input` event is fired on this `<input>`. */
|
25478
|
+
this.dateInput = new EventEmitter();
|
25479
|
+
this._onTouched = () => { };
|
25480
|
+
this._cvaOnChange = () => { };
|
25481
|
+
this._validatorOnChange = () => { };
|
25482
|
+
/** The form control validator for whether the input parses. */
|
25483
|
+
this._parseValidator = () => {
|
25484
|
+
return this._lastValueValid
|
25485
|
+
? null
|
25486
|
+
: { matDatepickerParse: { text: this._elementRef.nativeElement.value } };
|
25487
|
+
};
|
25488
|
+
/** The form control validator for the min date. */
|
25489
|
+
this._minValidator = (control) => {
|
25490
|
+
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
25491
|
+
return !this.min ||
|
25492
|
+
!controlValue ||
|
25493
|
+
this._dateAdapter.compareDatetime(this.min, controlValue) <= 0 ? null : { matDatepickerMin: { min: this.min, actual: controlValue } };
|
25494
|
+
};
|
25495
|
+
/** The form control validator for the max date. */
|
25496
|
+
this._maxValidator = (control) => {
|
25497
|
+
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
25498
|
+
return !this.max ||
|
25499
|
+
!controlValue ||
|
25500
|
+
this._dateAdapter.compareDatetime(this.max, controlValue) >= 0 ? null : { matDatepickerMax: { max: this.max, actual: controlValue } };
|
25501
|
+
};
|
25502
|
+
/** The form control validator for the date filter. */
|
25503
|
+
this._filterValidator = (control) => {
|
25504
|
+
const controlValue = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(control.value));
|
25505
|
+
return !this._dateFilter ||
|
25506
|
+
!controlValue ||
|
25507
|
+
this._dateFilter(controlValue, GIPIDatetimepickerFilterType.DATE)
|
25508
|
+
? null
|
25509
|
+
: { matDatepickerFilter: true };
|
25510
|
+
};
|
25511
|
+
/** The combined form control validator for this input. */
|
25512
|
+
this._validator = Validators.compose([
|
25513
|
+
this._parseValidator,
|
25514
|
+
this._minValidator,
|
25515
|
+
this._maxValidator,
|
25516
|
+
this._filterValidator,
|
25517
|
+
]);
|
25518
|
+
if (!this._dateAdapter) {
|
25519
|
+
throw createMissingDateImplError$1('GIPIDatetimeAdapter');
|
25520
|
+
}
|
25521
|
+
if (!this._dateFormats) {
|
25522
|
+
throw createMissingDateImplError$1('GIPI_DATETIME_FORMATS');
|
25523
|
+
}
|
25524
|
+
// Update the displayed date when the locale changes.
|
25525
|
+
this._localeSubscription = _dateAdapter.localeChanges.subscribe(() => this.value = this.value);
|
25526
|
+
}
|
25527
|
+
/** The datepicker that this input is associated with. */
|
25528
|
+
set gipiMatDatetimePicker(value) {
|
25529
|
+
this.registerDatepicker(value);
|
25530
|
+
}
|
25531
|
+
set matDatepickerFilter(filter) {
|
25532
|
+
this._dateFilter = filter;
|
25533
|
+
this._validatorOnChange();
|
25534
|
+
}
|
25535
|
+
get value() {
|
25536
|
+
return this._value;
|
25537
|
+
}
|
25538
|
+
set value(value) {
|
25539
|
+
value = this._dateAdapter.deserialize(value);
|
25540
|
+
this._lastValueValid = !value || this._dateAdapter.isValid(value);
|
25541
|
+
value = this._dateAdapter.getValidDateOrNull(value);
|
25542
|
+
const oldDate = this.value;
|
25543
|
+
this._value = value;
|
25544
|
+
this._formatValue(value);
|
25545
|
+
// use timeout to ensure the datetimepicker is instantiated and we get the correct format
|
25546
|
+
setTimeout(() => {
|
25547
|
+
if (!this._dateAdapter.sameDatetime(oldDate, value)) {
|
25548
|
+
this._valueChange.emit(value);
|
25549
|
+
}
|
25550
|
+
});
|
25551
|
+
}
|
25552
|
+
get min() {
|
25553
|
+
return this._min;
|
25554
|
+
}
|
25555
|
+
set min(value) {
|
25556
|
+
this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
25557
|
+
this._validatorOnChange();
|
25558
|
+
}
|
25559
|
+
get max() {
|
25560
|
+
return this._max;
|
25561
|
+
}
|
25562
|
+
set max(value) {
|
25563
|
+
this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
|
25564
|
+
this._validatorOnChange();
|
25565
|
+
}
|
25566
|
+
get disabled() {
|
25567
|
+
return !!this._disabled;
|
25568
|
+
}
|
25569
|
+
set disabled(value) {
|
25570
|
+
const newValue = coerceBooleanProperty(value);
|
25571
|
+
if (this._disabled !== newValue) {
|
25572
|
+
this._disabled = newValue;
|
25573
|
+
this._disabledChange.emit(newValue);
|
25574
|
+
}
|
25575
|
+
}
|
25576
|
+
ngAfterContentInit() {
|
25577
|
+
if (this._datepicker) {
|
25578
|
+
this._datepickerSubscription = this._datepicker.selectedChanged.subscribe((selected) => {
|
25579
|
+
this.value = selected;
|
25580
|
+
this._cvaOnChange(selected);
|
25581
|
+
this._onTouched();
|
25582
|
+
this.dateInput.emit(new GIPIDatetimepickerInputEvent(this, this._elementRef.nativeElement));
|
25583
|
+
this.dateChange.emit(new GIPIDatetimepickerInputEvent(this, this._elementRef.nativeElement));
|
25584
|
+
});
|
25585
|
+
}
|
25586
|
+
}
|
25587
|
+
ngOnDestroy() {
|
25588
|
+
this._datepickerSubscription.unsubscribe();
|
25589
|
+
this._localeSubscription.unsubscribe();
|
25590
|
+
this._valueChange.complete();
|
25591
|
+
this._disabledChange.complete();
|
25592
|
+
}
|
25593
|
+
registerOnValidatorChange(fn) {
|
25594
|
+
this._validatorOnChange = fn;
|
25595
|
+
}
|
25596
|
+
validate(c) {
|
25597
|
+
return this._validator ? this._validator(c) : null;
|
25598
|
+
}
|
25599
|
+
/**
|
25600
|
+
* Gets the element that the datepicker popup should be connected to.
|
25601
|
+
* @return The element to connect the popup to.
|
25602
|
+
*/
|
25603
|
+
getConnectedOverlayOrigin() {
|
25604
|
+
return this._formField
|
25605
|
+
? this._formField.getConnectedOverlayOrigin()
|
25606
|
+
: this._elementRef;
|
25607
|
+
}
|
25608
|
+
// Implemented as part of ControlValueAccessor
|
25609
|
+
writeValue(value) {
|
25610
|
+
this.value = value;
|
25611
|
+
}
|
25612
|
+
// Implemented as part of ControlValueAccessor
|
25613
|
+
registerOnChange(fn) {
|
25614
|
+
this._cvaOnChange = fn;
|
25615
|
+
}
|
25616
|
+
// Implemented as part of ControlValueAccessor
|
25617
|
+
registerOnTouched(fn) {
|
25618
|
+
this._onTouched = fn;
|
25619
|
+
}
|
25620
|
+
// Implemented as part of ControlValueAccessor
|
25621
|
+
setDisabledState(disabled) {
|
25622
|
+
this.disabled = disabled;
|
25623
|
+
}
|
25624
|
+
_onKeydown(event) {
|
25625
|
+
if (event.altKey && event.keyCode === DOWN_ARROW) {
|
25626
|
+
this._datepicker.open();
|
25627
|
+
event.preventDefault();
|
25628
|
+
}
|
25629
|
+
}
|
25630
|
+
_onInput(value) {
|
25631
|
+
let date = this._dateAdapter.parse(value, this.getParseFormat());
|
25632
|
+
this._lastValueValid = !date || this._dateAdapter.isValid(date);
|
25633
|
+
date = this._dateAdapter.getValidDateOrNull(date);
|
25634
|
+
this._value = date;
|
25635
|
+
this._cvaOnChange(date);
|
25636
|
+
this._valueChange.emit(date);
|
25637
|
+
this.dateInput.emit(new GIPIDatetimepickerInputEvent(this, this._elementRef.nativeElement));
|
25638
|
+
}
|
25639
|
+
_onChange() {
|
25640
|
+
this.dateChange.emit(new GIPIDatetimepickerInputEvent(this, this._elementRef.nativeElement));
|
25641
|
+
}
|
25642
|
+
/** Handles blur events on the input. */
|
25643
|
+
_onBlur() {
|
25644
|
+
// Reformat the input only if we have a valid value.
|
25645
|
+
if (this.value) {
|
25646
|
+
this._formatValue(this.value);
|
25647
|
+
}
|
25648
|
+
this._onTouched();
|
25649
|
+
}
|
25650
|
+
registerDatepicker(value) {
|
25651
|
+
if (value) {
|
25652
|
+
this._datepicker = value;
|
25653
|
+
this._datepicker._registerInput(this);
|
25654
|
+
}
|
25655
|
+
}
|
25656
|
+
getDisplayFormat() {
|
25657
|
+
switch (this._datepicker.type) {
|
25658
|
+
case 'date': return this._dateFormats.display.dateInput;
|
25659
|
+
case 'datetime': return this._dateFormats.display.datetimeInput;
|
25660
|
+
case 'time': return this._dateFormats.display.timeInput;
|
25661
|
+
case 'month': return this._dateFormats.display.monthInput;
|
25662
|
+
}
|
25663
|
+
}
|
25664
|
+
getParseFormat() {
|
25665
|
+
let parseFormat;
|
25666
|
+
switch (this._datepicker.type) {
|
25667
|
+
case 'date':
|
25668
|
+
parseFormat = this._dateFormats.parse.dateInput;
|
25669
|
+
break;
|
25670
|
+
case 'datetime':
|
25671
|
+
parseFormat = this._dateFormats.parse.datetimeInput;
|
25672
|
+
break;
|
25673
|
+
case 'time':
|
25674
|
+
parseFormat = this._dateFormats.parse.timeInput;
|
25675
|
+
break;
|
25676
|
+
case 'month':
|
25677
|
+
parseFormat = this._dateFormats.parse.monthInput;
|
25678
|
+
break;
|
25679
|
+
}
|
25680
|
+
if (!parseFormat) {
|
25681
|
+
parseFormat = this._dateFormats.parse.dateInput;
|
25682
|
+
}
|
25683
|
+
return parseFormat;
|
25684
|
+
}
|
25685
|
+
/** Formats a value and sets it on the input element. */
|
25686
|
+
_formatValue(value) {
|
25687
|
+
this._elementRef.nativeElement.value = value
|
25688
|
+
? this._dateAdapter.format(value, this.getDisplayFormat())
|
25689
|
+
: '';
|
25690
|
+
}
|
25691
|
+
};
|
25692
|
+
GIPIDatetimepickerInputDirective.ctorParameters = () => [
|
25693
|
+
{ type: ElementRef },
|
25694
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
25695
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [GIPI_DATETIME_FORMATS,] }] },
|
25696
|
+
{ type: MatFormField$1, decorators: [{ type: Optional }] }
|
25697
|
+
];
|
25698
|
+
__decorate([
|
25699
|
+
Input(),
|
25700
|
+
__metadata("design:type", GIPIDatetimepickerComponent),
|
25701
|
+
__metadata("design:paramtypes", [GIPIDatetimepickerComponent])
|
25702
|
+
], GIPIDatetimepickerInputDirective.prototype, "gipiMatDatetimePicker", null);
|
25703
|
+
__decorate([
|
25704
|
+
Input(),
|
25705
|
+
__metadata("design:type", Function),
|
25706
|
+
__metadata("design:paramtypes", [Function])
|
25707
|
+
], GIPIDatetimepickerInputDirective.prototype, "matDatepickerFilter", null);
|
25708
|
+
__decorate([
|
25709
|
+
Input(),
|
25710
|
+
__metadata("design:type", Object),
|
25711
|
+
__metadata("design:paramtypes", [Object])
|
25712
|
+
], GIPIDatetimepickerInputDirective.prototype, "value", null);
|
25713
|
+
__decorate([
|
25714
|
+
Input(),
|
25715
|
+
__metadata("design:type", Object),
|
25716
|
+
__metadata("design:paramtypes", [Object])
|
25717
|
+
], GIPIDatetimepickerInputDirective.prototype, "min", null);
|
25718
|
+
__decorate([
|
25719
|
+
Input(),
|
25720
|
+
__metadata("design:type", Object),
|
25721
|
+
__metadata("design:paramtypes", [Object])
|
25722
|
+
], GIPIDatetimepickerInputDirective.prototype, "max", null);
|
25723
|
+
__decorate([
|
25724
|
+
Input(),
|
25725
|
+
__metadata("design:type", Object),
|
25726
|
+
__metadata("design:paramtypes", [Object])
|
25727
|
+
], GIPIDatetimepickerInputDirective.prototype, "disabled", null);
|
25728
|
+
__decorate([
|
25729
|
+
Output(),
|
25730
|
+
__metadata("design:type", Object)
|
25731
|
+
], GIPIDatetimepickerInputDirective.prototype, "dateChange", void 0);
|
25732
|
+
__decorate([
|
25733
|
+
Output(),
|
25734
|
+
__metadata("design:type", Object)
|
25735
|
+
], GIPIDatetimepickerInputDirective.prototype, "dateInput", void 0);
|
25736
|
+
GIPIDatetimepickerInputDirective = GIPIDatetimepickerInputDirective_1 = __decorate([
|
25737
|
+
Directive({
|
25738
|
+
selector: 'input[gipiMatDatetimePicker]',
|
25739
|
+
exportAs: 'matDatepickerInput',
|
25740
|
+
providers: [
|
25741
|
+
GIPI_DATETIMEPICKER_VALUE_ACCESSOR,
|
25742
|
+
GIPI_DATETIMEPICKER_VALIDATORS,
|
25743
|
+
{
|
25744
|
+
provide: MAT_INPUT_VALUE_ACCESSOR,
|
25745
|
+
useExisting: GIPIDatetimepickerInputDirective_1,
|
25746
|
+
},
|
25747
|
+
],
|
25748
|
+
host: {
|
25749
|
+
'[attr.aria-haspopup]': 'true',
|
25750
|
+
'[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
|
25751
|
+
'[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
|
25752
|
+
'[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
|
25753
|
+
'[disabled]': 'disabled',
|
25754
|
+
'(focus)': '_datepicker._handleFocus()',
|
25755
|
+
'(input)': '_onInput($event.target.value)',
|
25756
|
+
'(change)': '_onChange()',
|
25757
|
+
'(blur)': '_onBlur()',
|
25758
|
+
'(keydown)': '_onKeydown($event)',
|
25759
|
+
},
|
25760
|
+
}),
|
25761
|
+
__param(1, Optional()),
|
25762
|
+
__param(2, Optional()),
|
25763
|
+
__param(2, Inject(GIPI_DATETIME_FORMATS)),
|
25764
|
+
__param(3, Optional()),
|
25765
|
+
__metadata("design:paramtypes", [ElementRef,
|
25766
|
+
GIPIDatetimeAdapter, Object, MatFormField$1])
|
25767
|
+
], GIPIDatetimepickerInputDirective);
|
25768
|
+
|
25769
|
+
const DAYS_PER_WEEK$1 = 7;
|
25770
|
+
/**
|
25771
|
+
* An internal component used to display a single month in the datepicker.
|
25772
|
+
* @docs-private
|
25773
|
+
*/
|
25774
|
+
let GIPIDatetimepickerMonthViewComponent = class GIPIDatetimepickerMonthViewComponent {
|
25775
|
+
constructor(_adapter, _dateFormats) {
|
25776
|
+
this._adapter = _adapter;
|
25777
|
+
this._dateFormats = _dateFormats;
|
25778
|
+
this.type = 'date';
|
25779
|
+
/** Emits when a new date is selected. */
|
25780
|
+
this.selectedChange = new EventEmitter();
|
25781
|
+
this._userSelection = new EventEmitter();
|
25782
|
+
if (!this._adapter) {
|
25783
|
+
throw createMissingDateImplError$1('GIPIDatetimeAdapter');
|
25784
|
+
}
|
25785
|
+
if (!this._dateFormats) {
|
25786
|
+
throw createMissingDateImplError$1('GIPI_DATETIME_FORMATS');
|
25787
|
+
}
|
25788
|
+
const firstDayOfWeek = this._adapter.getFirstDayOfWeek();
|
25789
|
+
const narrowWeekdays = this._adapter.getDayOfWeekNames('narrow');
|
25790
|
+
const longWeekdays = this._adapter.getDayOfWeekNames('long');
|
25791
|
+
// Rotate the labels for days of the week based on the configured first day of the week.
|
25792
|
+
let weekdays = longWeekdays.map((long, i) => { return { long, narrow: narrowWeekdays[i] }; });
|
25793
|
+
this._weekdays = weekdays
|
25794
|
+
.slice(firstDayOfWeek)
|
25795
|
+
.concat(weekdays.slice(0, firstDayOfWeek));
|
25796
|
+
this._activeDate = this._adapter.today();
|
25797
|
+
}
|
25798
|
+
get activeDate() {
|
25799
|
+
return this._activeDate;
|
25800
|
+
}
|
25801
|
+
set activeDate(value) {
|
25802
|
+
let oldActiveDate = this._activeDate;
|
25803
|
+
this._activeDate = value || this._adapter.today();
|
25804
|
+
if (oldActiveDate && this._activeDate && !this._adapter.sameMonthAndYear(oldActiveDate, this._activeDate)) {
|
25805
|
+
this._init();
|
25806
|
+
if (this._adapter.isInNextMonth(oldActiveDate, this._activeDate)) {
|
25807
|
+
this.calendarState('right');
|
25808
|
+
}
|
25809
|
+
else {
|
25810
|
+
this.calendarState('left');
|
25811
|
+
}
|
25812
|
+
}
|
25813
|
+
}
|
25814
|
+
get selected() {
|
25815
|
+
return this._selected;
|
25816
|
+
}
|
25817
|
+
set selected(value) {
|
25818
|
+
this._selected = value;
|
25819
|
+
this._selectedDate = this._getDateInCurrentMonth(this.selected);
|
25820
|
+
}
|
25821
|
+
ngAfterContentInit() {
|
25822
|
+
this._init();
|
25823
|
+
}
|
25824
|
+
/** Handles when a new date is selected. */
|
25825
|
+
_dateSelected(date) {
|
25826
|
+
this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), date, this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate)));
|
25827
|
+
if (this.type === 'date') {
|
25828
|
+
this._userSelection.emit();
|
25829
|
+
}
|
25830
|
+
}
|
25831
|
+
_calendarStateDone() {
|
25832
|
+
this._calendarState = '';
|
25833
|
+
}
|
25834
|
+
/** Initializes this month view. */
|
25835
|
+
_init() {
|
25836
|
+
this._selectedDate = this._getDateInCurrentMonth(this.selected);
|
25837
|
+
this._todayDate = this._getDateInCurrentMonth(this._adapter.today());
|
25838
|
+
let firstOfMonth = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), 1, this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate));
|
25839
|
+
this._firstWeekOffset = (DAYS_PER_WEEK$1 + this._adapter.getDayOfWeek(firstOfMonth) - this._adapter.getFirstDayOfWeek()) % DAYS_PER_WEEK$1;
|
25840
|
+
this._createWeekCells();
|
25841
|
+
}
|
25842
|
+
/** Creates MdCalendarCells for the dates in this month. */
|
25843
|
+
_createWeekCells() {
|
25844
|
+
let daysInMonth = this._adapter.getNumDaysInMonth(this.activeDate);
|
25845
|
+
let dateNames = this._adapter.getDateNames();
|
25846
|
+
this._weeks = [[]];
|
25847
|
+
for (let i = 0, cell = this._firstWeekOffset; i < daysInMonth; i++, cell++) {
|
25848
|
+
if (cell == DAYS_PER_WEEK$1) {
|
25849
|
+
this._weeks.push([]);
|
25850
|
+
cell = 0;
|
25851
|
+
}
|
25852
|
+
let date = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), this._adapter.getMonth(this.activeDate), i + 1, this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate));
|
25853
|
+
let enabled = !this.dateFilter || this.dateFilter(date);
|
25854
|
+
let ariaLabel = this._adapter.format(date, this._dateFormats.display.dateA11yLabel);
|
25855
|
+
this._weeks[this._weeks.length - 1].push(new GIPIDatetimepickerCalendarCell(i + 1, dateNames[i], ariaLabel, enabled));
|
25856
|
+
}
|
25857
|
+
}
|
25858
|
+
/** Gets the date in this month that the given Date falls on. Returns null if the given Date is in another month. */
|
25859
|
+
_getDateInCurrentMonth(date) {
|
25860
|
+
return this._adapter.sameMonthAndYear(date, this.activeDate)
|
25861
|
+
? this._adapter.getDate(date)
|
25862
|
+
: null;
|
25863
|
+
}
|
25864
|
+
calendarState(direction) {
|
25865
|
+
this._calendarState = direction;
|
25866
|
+
}
|
25867
|
+
};
|
25868
|
+
GIPIDatetimepickerMonthViewComponent.ctorParameters = () => [
|
25869
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
25870
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [GIPI_DATETIME_FORMATS,] }] }
|
25871
|
+
];
|
25872
|
+
__decorate([
|
25873
|
+
Input(),
|
25874
|
+
__metadata("design:type", String)
|
25875
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "type", void 0);
|
25876
|
+
__decorate([
|
25877
|
+
Input(),
|
25878
|
+
__metadata("design:type", Function)
|
25879
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "dateFilter", void 0);
|
25880
|
+
__decorate([
|
25881
|
+
Input(),
|
25882
|
+
__metadata("design:type", Object),
|
25883
|
+
__metadata("design:paramtypes", [Object])
|
25884
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "activeDate", null);
|
25885
|
+
__decorate([
|
25886
|
+
Input(),
|
25887
|
+
__metadata("design:type", Object),
|
25888
|
+
__metadata("design:paramtypes", [Object])
|
25889
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "selected", null);
|
25890
|
+
__decorate([
|
25891
|
+
Output(),
|
25892
|
+
__metadata("design:type", Object)
|
25893
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "selectedChange", void 0);
|
25894
|
+
__decorate([
|
25895
|
+
Output(),
|
25896
|
+
__metadata("design:type", Object)
|
25897
|
+
], GIPIDatetimepickerMonthViewComponent.prototype, "_userSelection", void 0);
|
25898
|
+
GIPIDatetimepickerMonthViewComponent = __decorate([
|
25899
|
+
Component({
|
25900
|
+
selector: 'gipi-mat-datetime-picker-month-view',
|
25901
|
+
template: "<table class=\"gipi-mat-datetime-picker-calendar-table\">\n <thead class=\"gipi-mat-datetime-picker-calendar-table-header\">\n <tr>\n <th *ngFor=\"let day of _weekdays\"\n [attr.aria-label]=\"day.long\">\n {{ day.narrow }}\n </th>\n </tr>\n <tr>\n <th class=\"gipi-mat-datetime-picker-calendar-table-header-divider\"\n colspan=\"7\"\n aria-hidden=\"true\">\n </th>\n </tr>\n </thead>\n <tbody gipiMatDatetimePickerCalendarBody\n role=\"grid\"\n [activeCell]=\"_adapter.getDate(activeDate) - 1\"\n [rows]=\"_weeks\"\n [selectedValue]=\"_selectedDate\"\n [todayValue]=\"_todayDate\"\n [@slideCalendar]=\"_calendarState\"\n (@slideCalendar.done)=\"_calendarStateDone()\"\n (selectedValueChange)=\"_dateSelected($event)\">\n </tbody>\n</table>",
|
25902
|
+
animations: [slideCalendar],
|
25903
|
+
encapsulation: ViewEncapsulation.None,
|
25904
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
25905
|
+
}),
|
25906
|
+
__param(0, Optional()),
|
25907
|
+
__param(1, Optional()),
|
25908
|
+
__param(1, Inject(GIPI_DATETIME_FORMATS)),
|
25909
|
+
__metadata("design:paramtypes", [GIPIDatetimeAdapter, Object])
|
25910
|
+
], GIPIDatetimepickerMonthViewComponent);
|
25911
|
+
|
25912
|
+
const ɵ0$3 = (i) => String(i);
|
25913
|
+
/** The default hour names to use if Intl API is not available. */
|
25914
|
+
const DEFAULT_HOUR_NAMES = range$1(24, ɵ0$3);
|
25915
|
+
const ɵ1 = (i) => String(i);
|
25916
|
+
/** The default minute names to use if Intl API is not available. */
|
25917
|
+
const DEFAULT_MINUTE_NAMES = range$1(60, ɵ1);
|
25918
|
+
function range$1(length, valueFunction) {
|
25919
|
+
const valuesArray = Array(length);
|
25920
|
+
for (let i = 0; i < length; i++) {
|
25921
|
+
valuesArray[i] = valueFunction(i);
|
25922
|
+
}
|
25923
|
+
return valuesArray;
|
25924
|
+
}
|
25925
|
+
let GIPINativeDatetimeAdapter = class GIPINativeDatetimeAdapter extends GIPIDatetimeAdapter {
|
25926
|
+
constructor(matDateLocale, _delegate) {
|
25927
|
+
super(_delegate);
|
25928
|
+
this.setLocale(matDateLocale);
|
25929
|
+
}
|
25930
|
+
clone(date) {
|
25931
|
+
return this.createDatetime(this.getYear(date), this.getMonth(date), this.getDate(date), this.getHour(date), this.getMinute(date));
|
25932
|
+
}
|
25933
|
+
getHour(date) {
|
25934
|
+
return date.getHours();
|
25935
|
+
}
|
25936
|
+
getMinute(date) {
|
25937
|
+
return date.getMinutes();
|
25938
|
+
}
|
25939
|
+
isInNextMonth(startDate, endDate) {
|
25940
|
+
const nextMonth = this.getDateInNextMonth(startDate);
|
25941
|
+
return this.sameMonthAndYear(nextMonth, endDate);
|
25942
|
+
}
|
25943
|
+
createDatetime(year, month, date, hour, minute) {
|
25944
|
+
// Check for invalid month and date (except upper bound on date which we have to check after
|
25945
|
+
// creating the Date).
|
25946
|
+
if (month < 0 || month > 11) {
|
25947
|
+
throw Error(`Invalid month index "${month}". Month index has to be between 0 and 11.`);
|
25948
|
+
}
|
25949
|
+
if (date < 1) {
|
25950
|
+
throw Error(`Invalid date "${date}". Date has to be greater than 0.`);
|
25951
|
+
}
|
25952
|
+
if (hour < 0 || hour > 23) {
|
25953
|
+
throw Error(`Invalid hour "${hour}". Hour has to be between 0 and 23.`);
|
25954
|
+
}
|
25955
|
+
if (minute < 0 || minute > 59) {
|
25956
|
+
throw Error(`Invalid minute "${minute}". Minute has to be between 0 and 59.`);
|
25957
|
+
}
|
25958
|
+
const result = this._createDateWithOverflow(year, month, date, hour, minute);
|
25959
|
+
// Check that the date wasn't above the upper bound for the month, causing the month to overflow
|
25960
|
+
if (result.getMonth() !== month) {
|
25961
|
+
throw Error(`Invalid date "${date}" for month with index "${month}".`);
|
25962
|
+
}
|
25963
|
+
return result;
|
25964
|
+
}
|
25965
|
+
getFirstDateOfMonth(date) {
|
25966
|
+
const result = new Date();
|
25967
|
+
result.setFullYear(date.getFullYear(), date.getMonth(), 1);
|
25968
|
+
return result;
|
25969
|
+
}
|
25970
|
+
getHourNames() {
|
25971
|
+
return DEFAULT_HOUR_NAMES;
|
25972
|
+
}
|
25973
|
+
getMinuteNames() {
|
25974
|
+
return DEFAULT_MINUTE_NAMES;
|
25975
|
+
}
|
25976
|
+
addCalendarYears(date, years) {
|
25977
|
+
return this.addCalendarMonths(date, years * 12);
|
25978
|
+
}
|
25979
|
+
addCalendarMonths(date, months) {
|
25980
|
+
let newDate = this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + months, this.getDate(date), this.getHour(date), this.getMinute(date));
|
25981
|
+
// It's possible to wind up in the wrong month if the original month has more days than the new
|
25982
|
+
// month. In this case we want to go to the last day of the desired month.
|
25983
|
+
// Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't
|
25984
|
+
// guarantee this.
|
25985
|
+
if (this.getMonth(newDate) !== (((this.getMonth(date) + months) % 12) + 12) % 12) {
|
25986
|
+
newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0, this.getHour(date), this.getMinute(date));
|
25987
|
+
}
|
25988
|
+
return newDate;
|
25989
|
+
}
|
25990
|
+
addCalendarDays(date, days) {
|
25991
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date) + days, this.getHour(date), this.getMinute(date));
|
25992
|
+
}
|
25993
|
+
addCalendarHours(date, hours) {
|
25994
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date), this.getHour(date) + hours, this.getMinute(date));
|
25995
|
+
}
|
25996
|
+
addCalendarMinutes(date, minutes) {
|
25997
|
+
return this._createDateWithOverflow(this.getYear(date), this.getMonth(date), this.getDate(date), this.getHour(date), this.getMinute(date) + minutes);
|
25998
|
+
}
|
25999
|
+
toIso8601(date) {
|
26000
|
+
return (super.toIso8601(date) + 'T' + [this._2digit(date.getUTCHours()), this._2digit(date.getUTCMinutes()),].join(':'));
|
26001
|
+
}
|
26002
|
+
getDateInNextMonth(date) {
|
26003
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 1, date.getHours(), date.getMinutes());
|
26004
|
+
}
|
26005
|
+
/**
|
26006
|
+
* Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
|
26007
|
+
* other browsers do not. We remove them to make output consistent and because they interfere with
|
26008
|
+
* date parsing.
|
26009
|
+
* @param str The string to strip direction characters from.
|
26010
|
+
* @returns The stripped string.
|
26011
|
+
*/
|
26012
|
+
_stripDirectionalityCharacters(str) {
|
26013
|
+
return str.replace(/[\u200e\u200f]/g, '');
|
26014
|
+
}
|
26015
|
+
/**
|
26016
|
+
* Pads a number to make it two digits.
|
26017
|
+
* @param n The number to pad.
|
26018
|
+
* @returns The padded number.
|
26019
|
+
*/
|
26020
|
+
_2digit(n) {
|
26021
|
+
return ('00' + n).slice(-2);
|
26022
|
+
}
|
26023
|
+
/** Creates a date but allows the month and date to overflow. */
|
26024
|
+
_createDateWithOverflow(year, month, date, hours, minutes) {
|
26025
|
+
const result = new Date(year, month, date, hours, minutes);
|
26026
|
+
// We need to correct for the fact that JS native Date treats years in range [0, 99] as
|
26027
|
+
// abbreviations for 19xx.
|
26028
|
+
if (year >= 0 && year < 100) {
|
26029
|
+
result.setFullYear(this.getYear(result) - 1900);
|
26030
|
+
}
|
26031
|
+
return result;
|
26032
|
+
}
|
26033
|
+
};
|
26034
|
+
GIPINativeDatetimeAdapter.ctorParameters = () => [
|
26035
|
+
{ type: String, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DATE_LOCALE$1,] }] },
|
26036
|
+
{ type: DateAdapter$1 }
|
26037
|
+
];
|
26038
|
+
GIPINativeDatetimeAdapter = __decorate([
|
26039
|
+
Injectable(),
|
26040
|
+
__param(0, Optional()), __param(0, Inject(MAT_DATE_LOCALE$1)),
|
26041
|
+
__metadata("design:paramtypes", [String, DateAdapter$1])
|
26042
|
+
], GIPINativeDatetimeAdapter);
|
26043
|
+
|
26044
|
+
const GIPI_NATIVE_DATETIME_FORMATS = {
|
26045
|
+
parse: {},
|
26046
|
+
display: {
|
26047
|
+
dateInput: { year: 'numeric', month: '2-digit', day: '2-digit' },
|
26048
|
+
monthInput: { month: 'long' },
|
26049
|
+
datetimeInput: {
|
26050
|
+
year: 'numeric',
|
26051
|
+
month: '2-digit',
|
26052
|
+
day: '2-digit',
|
26053
|
+
hour: '2-digit',
|
26054
|
+
minute: '2-digit',
|
26055
|
+
},
|
26056
|
+
timeInput: { hour: '2-digit', minute: '2-digit' },
|
26057
|
+
monthYearLabel: { year: 'numeric', month: 'short' },
|
26058
|
+
dateA11yLabel: { year: 'numeric', month: 'long', day: 'numeric' },
|
26059
|
+
monthYearA11yLabel: { year: 'numeric', month: 'long' },
|
26060
|
+
popupHeaderDateLabel: { weekday: 'short', month: 'short', day: '2-digit' },
|
26061
|
+
},
|
26062
|
+
};
|
26063
|
+
|
26064
|
+
let NativeDatetimeModule = class NativeDatetimeModule {
|
26065
|
+
};
|
26066
|
+
NativeDatetimeModule = __decorate([
|
26067
|
+
NgModule({
|
26068
|
+
imports: [
|
26069
|
+
NativeDateModule,
|
26070
|
+
],
|
26071
|
+
providers: [
|
26072
|
+
{
|
26073
|
+
provide: GIPIDatetimeAdapter,
|
26074
|
+
useClass: GIPINativeDatetimeAdapter,
|
26075
|
+
},
|
26076
|
+
],
|
26077
|
+
})
|
26078
|
+
], NativeDatetimeModule);
|
26079
|
+
const ɵ0$4 = GIPI_NATIVE_DATETIME_FORMATS;
|
26080
|
+
let GIPINativeDatetimeModule = class GIPINativeDatetimeModule {
|
26081
|
+
};
|
26082
|
+
GIPINativeDatetimeModule = __decorate([
|
26083
|
+
NgModule({
|
26084
|
+
imports: [
|
26085
|
+
NativeDatetimeModule,
|
26086
|
+
MatNativeDateModule$1,
|
26087
|
+
],
|
26088
|
+
providers: [
|
26089
|
+
{
|
26090
|
+
provide: GIPI_DATETIME_FORMATS,
|
26091
|
+
useValue: ɵ0$4,
|
26092
|
+
},
|
26093
|
+
],
|
26094
|
+
})
|
26095
|
+
], GIPINativeDatetimeModule);
|
26096
|
+
|
26097
|
+
/**
|
26098
|
+
* An internal component used to display a single year in the datepicker.
|
26099
|
+
* @docs-private
|
26100
|
+
*/
|
26101
|
+
let GIPIDatetimepickerYearViewComponent = class GIPIDatetimepickerYearViewComponent {
|
26102
|
+
constructor(_adapter, _dateFormats) {
|
26103
|
+
this._adapter = _adapter;
|
26104
|
+
this._dateFormats = _dateFormats;
|
26105
|
+
this.type = 'date';
|
26106
|
+
/** Emits when a new month is selected. */
|
26107
|
+
this.selectedChange = new EventEmitter();
|
26108
|
+
this._userSelection = new EventEmitter();
|
26109
|
+
if (!this._adapter) {
|
26110
|
+
throw createMissingDateImplError$1('DatetimeAdapter');
|
26111
|
+
}
|
26112
|
+
if (!this._dateFormats) {
|
26113
|
+
throw createMissingDateImplError$1('GIPI_DATETIME_FORMATS');
|
26114
|
+
}
|
26115
|
+
this._activeDate = this._adapter.today();
|
26116
|
+
}
|
26117
|
+
get activeDate() {
|
26118
|
+
return this._activeDate;
|
26119
|
+
}
|
26120
|
+
set activeDate(value) {
|
26121
|
+
let oldActiveDate = this._activeDate;
|
26122
|
+
this._activeDate = value || this._adapter.today();
|
26123
|
+
if (oldActiveDate && this._activeDate && !this._adapter.sameYear(oldActiveDate, this._activeDate)) {
|
26124
|
+
this._init();
|
26125
|
+
}
|
26126
|
+
}
|
26127
|
+
get selected() {
|
26128
|
+
return this._selected;
|
26129
|
+
}
|
26130
|
+
set selected(value) {
|
26131
|
+
this._selected = value;
|
26132
|
+
this._selectedMonth = this._getMonthInCurrentYear(this.selected);
|
26133
|
+
}
|
26134
|
+
ngAfterContentInit() {
|
26135
|
+
this._init();
|
26136
|
+
}
|
26137
|
+
/** Handles when a new month is selected. */
|
26138
|
+
_monthSelected(month) {
|
26139
|
+
const normalizedDate = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), month, 1, 0, 0);
|
26140
|
+
this.selectedChange.emit(this._adapter.createDatetime(this._adapter.getYear(this.activeDate), month, Math.min(this._adapter.getDate(this.activeDate), this._adapter.getNumDaysInMonth(normalizedDate)), this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate)));
|
26141
|
+
if (this.type === 'month') {
|
26142
|
+
this._userSelection.emit();
|
26143
|
+
}
|
26144
|
+
}
|
26145
|
+
_calendarStateDone() {
|
26146
|
+
this._calendarState = '';
|
26147
|
+
}
|
26148
|
+
/** Initializes this month view. */
|
26149
|
+
_init() {
|
26150
|
+
this._selectedMonth = this._getMonthInCurrentYear(this.selected);
|
26151
|
+
this._todayMonth = this._getMonthInCurrentYear(this._adapter.today());
|
26152
|
+
this._yearLabel = this._adapter.getYearName(this.activeDate);
|
26153
|
+
let monthNames = this._adapter.getMonthNames('short');
|
26154
|
+
// First row of months only contains 5 elements so we can fit the year label on the same row.
|
26155
|
+
this._months = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]].map((row) => row.map((month) => this._createCellForMonth(month, monthNames[month])));
|
26156
|
+
}
|
26157
|
+
/**
|
26158
|
+
* Gets the month in this year that the given Date falls on.
|
26159
|
+
* Returns null if the given Date is in another year.
|
26160
|
+
*/
|
26161
|
+
_getMonthInCurrentYear(date) {
|
26162
|
+
return this._adapter.sameYear(date, this.activeDate)
|
26163
|
+
? this._adapter.getMonth(date)
|
26164
|
+
: null;
|
26165
|
+
}
|
26166
|
+
/** Creates an MdCalendarCell for the given month. */
|
26167
|
+
_createCellForMonth(month, monthName) {
|
26168
|
+
let ariaLabel = this._adapter.format(this._adapter.createDatetime(this._adapter.getYear(this.activeDate), month, 1, this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate)), this._dateFormats.display.monthYearA11yLabel);
|
26169
|
+
return new GIPIDatetimepickerCalendarCell(month, monthName.toLocaleUpperCase(), ariaLabel, this._isMonthEnabled(month));
|
26170
|
+
}
|
26171
|
+
/** Whether the given month is enabled. */
|
26172
|
+
_isMonthEnabled(month) {
|
26173
|
+
if (!this.dateFilter) {
|
26174
|
+
return true;
|
26175
|
+
}
|
26176
|
+
let firstOfMonth = this._adapter.createDatetime(this._adapter.getYear(this.activeDate), month, 1, this._adapter.getHour(this.activeDate), this._adapter.getMinute(this.activeDate));
|
26177
|
+
// If any date in the month is enabled count the month as enabled.
|
26178
|
+
for (let date = firstOfMonth; this._adapter.getMonth(date) == month; date = this._adapter.addCalendarDays(date, 1)) {
|
26179
|
+
if (this.dateFilter(date)) {
|
26180
|
+
return true;
|
26181
|
+
}
|
26182
|
+
}
|
26183
|
+
return false;
|
26184
|
+
}
|
26185
|
+
};
|
26186
|
+
GIPIDatetimepickerYearViewComponent.ctorParameters = () => [
|
26187
|
+
{ type: GIPIDatetimeAdapter, decorators: [{ type: Optional }] },
|
26188
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [GIPI_DATETIME_FORMATS,] }] }
|
26189
|
+
];
|
26190
|
+
__decorate([
|
26191
|
+
Input(),
|
26192
|
+
__metadata("design:type", String)
|
26193
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "type", void 0);
|
26194
|
+
__decorate([
|
26195
|
+
Input(),
|
26196
|
+
__metadata("design:type", Function)
|
26197
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "dateFilter", void 0);
|
26198
|
+
__decorate([
|
26199
|
+
Input(),
|
26200
|
+
__metadata("design:type", Object),
|
26201
|
+
__metadata("design:paramtypes", [Object])
|
26202
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "activeDate", null);
|
26203
|
+
__decorate([
|
26204
|
+
Input(),
|
26205
|
+
__metadata("design:type", Object),
|
26206
|
+
__metadata("design:paramtypes", [Object])
|
26207
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "selected", null);
|
26208
|
+
__decorate([
|
26209
|
+
Output(),
|
26210
|
+
__metadata("design:type", Object)
|
26211
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "selectedChange", void 0);
|
26212
|
+
__decorate([
|
26213
|
+
Output(),
|
26214
|
+
__metadata("design:type", Object)
|
26215
|
+
], GIPIDatetimepickerYearViewComponent.prototype, "_userSelection", void 0);
|
26216
|
+
GIPIDatetimepickerYearViewComponent = __decorate([
|
26217
|
+
Component({
|
26218
|
+
selector: 'gipi-mat-datetime-picker-year-view',
|
26219
|
+
template: "<table class=\"gipi-mat-datetime-picker-calendar-table\"\n role=\"presentation\">\n <thead class=\"gipi-mat-datetime-picker-calendar-table-header\">\n <tr>\n <th class=\"gipi-mat-datetime-picker-calendar-table-header-divider\"\n colspan=\"4\">\n </th>\n </tr>\n </thead>\n <tbody gipiMatDatetimePickerCalendarBody\n allowDisabledSelection=\"true\"\n role=\"grid\"\n [label]=\"_yearLabel\"\n [rows]=\"_months\"\n [todayValue]=\"_todayMonth\"\n [labelMinRequiredCells]=\"2\"\n [numCols]=\"4\"\n [cellAspectRatio]=\"4 / 7\"\n [activeCell]=\"_adapter.getMonth(activeDate)\"\n [selectedValue]=\"_selectedMonth\"\n [@slideCalendar]=\"_calendarState\"\n (@slideCalendar.done)=\"_calendarStateDone()\"\n (selectedValueChange)=\"_monthSelected($event)\">\n </tbody>\n</table>\n",
|
26220
|
+
animations: [slideCalendar],
|
26221
|
+
encapsulation: ViewEncapsulation.None,
|
26222
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
26223
|
+
}),
|
26224
|
+
__param(0, Optional()),
|
26225
|
+
__param(1, Optional()),
|
26226
|
+
__param(1, Inject(GIPI_DATETIME_FORMATS)),
|
26227
|
+
__metadata("design:paramtypes", [GIPIDatetimeAdapter, Object])
|
26228
|
+
], GIPIDatetimepickerYearViewComponent);
|
26229
|
+
|
26230
|
+
let DatetimepickerModule = class DatetimepickerModule {
|
26231
|
+
};
|
26232
|
+
DatetimepickerModule = __decorate([
|
26233
|
+
NgModule({
|
26234
|
+
imports: [
|
26235
|
+
CommonModule,
|
26236
|
+
FormsModule,
|
26237
|
+
ReactiveFormsModule,
|
26238
|
+
MatButtonModule,
|
26239
|
+
MatDialogModule,
|
26240
|
+
MatIconModule,
|
26241
|
+
OverlayModule,
|
26242
|
+
A11yModule,
|
26243
|
+
MatDatepickerModule,
|
26244
|
+
GIPINativeDatetimeModule,
|
26245
|
+
],
|
26246
|
+
exports: [
|
26247
|
+
FormsModule,
|
26248
|
+
ReactiveFormsModule,
|
26249
|
+
MatButtonModule,
|
26250
|
+
MatDialogModule,
|
26251
|
+
MatIconModule,
|
26252
|
+
OverlayModule,
|
26253
|
+
A11yModule,
|
26254
|
+
MatDatepickerModule,
|
26255
|
+
GIPINativeDatetimeModule,
|
26256
|
+
GIPIDatetimepickerCalendarComponent,
|
26257
|
+
GIPIDatetimepickerCalendarBodyComponent,
|
26258
|
+
GIPIDatetimepickerClockComponent,
|
26259
|
+
GIPIDatetimepickerComponent,
|
26260
|
+
GIPIDatetimepickerToggleComponent,
|
26261
|
+
GIPIDatetimepickerInputDirective,
|
26262
|
+
GIPIDatetimepickerContentComponent,
|
26263
|
+
GIPIDatetimepickerMonthViewComponent,
|
26264
|
+
GIPIDatetimepickerYearViewComponent,
|
26265
|
+
GIPIDatetimepickerMultiYearViewComponent,
|
26266
|
+
GIPIDateAndTimePickerComponent,
|
26267
|
+
],
|
26268
|
+
declarations: [
|
26269
|
+
GIPIDatetimepickerCalendarComponent,
|
26270
|
+
GIPIDatetimepickerCalendarBodyComponent,
|
26271
|
+
GIPIDatetimepickerClockComponent,
|
26272
|
+
GIPIDatetimepickerComponent,
|
26273
|
+
GIPIDatetimepickerToggleComponent,
|
26274
|
+
GIPIDatetimepickerInputDirective,
|
26275
|
+
GIPIDatetimepickerContentComponent,
|
26276
|
+
GIPIDatetimepickerMonthViewComponent,
|
26277
|
+
GIPIDatetimepickerYearViewComponent,
|
26278
|
+
GIPIDatetimepickerMultiYearViewComponent,
|
26279
|
+
GIPIDateAndTimePickerComponent,
|
26280
|
+
],
|
26281
|
+
entryComponents: [
|
26282
|
+
GIPIDatetimepickerContentComponent,
|
26283
|
+
],
|
26284
|
+
providers: [
|
26285
|
+
MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER$1,
|
26286
|
+
],
|
26287
|
+
})
|
26288
|
+
], DatetimepickerModule);
|
26289
|
+
|
26290
|
+
var CalendarMonthYearComponent_1;
|
26291
|
+
const moment$4 = moment_;
|
26292
|
+
let CalendarMonthYearComponent = CalendarMonthYearComponent_1 = class CalendarMonthYearComponent {
|
26293
|
+
constructor(_changeDetectorRef) {
|
26294
|
+
this._changeDetectorRef = _changeDetectorRef;
|
26295
|
+
this._subscriptions = new Subscription();
|
26296
|
+
this._animationState = 'enter';
|
26297
|
+
this._animationDone = new Subject();
|
26298
|
+
this.years = [];
|
26299
|
+
this.months = [];
|
26300
|
+
this._calendarView = 'both';
|
26301
|
+
}
|
26302
|
+
ngOnInit() {
|
26303
|
+
if (this._locale) {
|
26304
|
+
moment$4.locale(this._locale);
|
26305
|
+
}
|
26306
|
+
else {
|
26307
|
+
moment$4.locale('pt-br');
|
26308
|
+
}
|
26309
|
+
this.months = [...this.monthYearPicker.model.months];
|
26310
|
+
this._calendarView = this.monthYearPicker.calendarView;
|
26311
|
+
if (this._calendarView === 'year') {
|
26312
|
+
this.toggleShowYears();
|
26313
|
+
}
|
26314
|
+
this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex, this.monthYearPicker.model.selectedMonthYear);
|
26315
|
+
}
|
26316
|
+
ngAfterViewInit() {
|
26317
|
+
if (this._changeDetectorRef) {
|
26318
|
+
this._subscriptions.add(this.monthYearPicker._stateChanges.subscribe(() => {
|
26319
|
+
this._changeDetectorRef.markForCheck();
|
26320
|
+
}));
|
26321
|
+
}
|
26322
|
+
}
|
26323
|
+
ngOnDestroy() {
|
26324
|
+
this._subscriptions.unsubscribe();
|
26325
|
+
this._animationDone.complete();
|
26326
|
+
}
|
26327
|
+
_startExitAnimation() {
|
26328
|
+
this._animationState = 'void';
|
26329
|
+
if (this._changeDetectorRef) {
|
26330
|
+
this._changeDetectorRef.markForCheck();
|
26331
|
+
}
|
26332
|
+
}
|
26333
|
+
decrement() {
|
26334
|
+
this.monthYearPicker.model.decrementYear();
|
26335
|
+
if (this.isShowYears) {
|
26336
|
+
this._renderYears();
|
26337
|
+
}
|
26338
|
+
}
|
26339
|
+
increment() {
|
26340
|
+
this.monthYearPicker.model.incrementYear();
|
26341
|
+
if (this.isShowYears) {
|
26342
|
+
this._renderYears();
|
26343
|
+
}
|
26344
|
+
}
|
26345
|
+
selectMonth(index) {
|
26346
|
+
this.monthYearPicker.model.selectMonth(index);
|
26347
|
+
this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex, this.monthYearPicker.model.selectedMonthYear);
|
26348
|
+
this.monthYearPicker.close();
|
26349
|
+
}
|
26350
|
+
isSelectedMonth(monthIndex) {
|
26351
|
+
return this.monthYearPicker.model.selectedMonthIndex == monthIndex && this.monthYearPicker.model.selectedMonthYear == this.monthYearPicker.model.selectedYearMoment.year();
|
26352
|
+
}
|
26353
|
+
isCurrentMonth(monthIndex) {
|
26354
|
+
const currentMonth = moment$4().month();
|
26355
|
+
const currentYear = moment$4().year();
|
26356
|
+
return (monthIndex === currentMonth) && (this.monthYearPicker.model.selectedYearMoment.year() === currentYear);
|
26357
|
+
}
|
26358
|
+
isDisabledMonth(index) {
|
26359
|
+
let disabled = false;
|
26360
|
+
if (!ObjectUtil.isNull(this.monthYearPicker)) {
|
26361
|
+
const minMonth = !ObjectUtil.isNull(this.monthYearPicker.min) ? this.monthYearPicker.min.month : null;
|
26362
|
+
const maxMonth = !ObjectUtil.isNull(this.monthYearPicker.max) ? this.monthYearPicker.max.month : null;
|
26363
|
+
if (!ObjectUtil.isNull(minMonth) && !ObjectUtil.isNull(maxMonth)) {
|
26364
|
+
disabled = index < minMonth || index > maxMonth;
|
26365
|
+
}
|
26366
|
+
else if (!ObjectUtil.isNull(minMonth)) {
|
26367
|
+
disabled = index < minMonth;
|
26368
|
+
}
|
26369
|
+
else if (!ObjectUtil.isNull(maxMonth)) {
|
26370
|
+
disabled = index > maxMonth;
|
26371
|
+
}
|
26372
|
+
}
|
26373
|
+
return disabled;
|
26374
|
+
// let disabled = false;
|
26375
|
+
// if (this._enabledMonths && this._enabledMonths.length > 0) {
|
26376
|
+
// disabled = this._enabledMonths.indexOf(index) < 0;
|
26377
|
+
// }
|
26378
|
+
// if (this._disabledMonths && this._disabledMonths.length > 0) {
|
26379
|
+
// disabled = this._disabledMonths.indexOf(index) >= 0;
|
26380
|
+
// }
|
26381
|
+
// return disabled;
|
26382
|
+
}
|
26383
|
+
/** Years */
|
26384
|
+
toggleShowYears() {
|
26385
|
+
this.isShowYears = !this.isShowYears;
|
26386
|
+
this._renderYears();
|
26387
|
+
}
|
26388
|
+
_renderYears() {
|
26389
|
+
this.years = [];
|
26390
|
+
for (let i = 11; i > 0; i--) {
|
26391
|
+
this.years.push(this.monthYearPicker.model.selectedYearMoment.year() - i);
|
26392
|
+
}
|
26393
|
+
for (let i = 0; i <= 12; i++) {
|
26394
|
+
this.years.push(this.monthYearPicker.model.selectedYearMoment.year() + i);
|
26395
|
+
}
|
26396
|
+
}
|
26397
|
+
get periodButtonLabel() {
|
26398
|
+
const formatYearRange = (start, end) => {
|
26399
|
+
return `${start} \u2013 ${end}`;
|
26400
|
+
};
|
26401
|
+
return this.isShowYears ? formatYearRange(this.years[0], this.years[this.years.length - 1]) : this.monthYearPicker.model.selectedYearText;
|
26402
|
+
}
|
26403
|
+
selectYear(year) {
|
26404
|
+
if (this._calendarView === 'both') {
|
26405
|
+
this.isShowYears = false;
|
26406
|
+
}
|
26407
|
+
this.monthYearPicker.model.selectedYearMoment = moment$4().year(year);
|
26408
|
+
this.monthYearPicker.model.updateYearText();
|
26409
|
+
if (this._calendarView === 'year') {
|
26410
|
+
this.monthYearPicker.onValueChange(this.monthYearPicker.model.selectedMonthIndex, year);
|
26411
|
+
this.monthYearPicker.close();
|
26412
|
+
}
|
26413
|
+
}
|
26414
|
+
isSelectedYear(year) {
|
26415
|
+
return this.monthYearPicker.model.selectedYearMoment.year() === year;
|
26416
|
+
}
|
26417
|
+
isCurrentYear(year) {
|
26418
|
+
return moment$4().year() === year;
|
26419
|
+
}
|
26420
|
+
isDisabledYear(index) {
|
26421
|
+
let disabled = false;
|
26422
|
+
if (!ObjectUtil.isNull(this.monthYearPicker)) {
|
26423
|
+
const minYear = !ObjectUtil.isNull(this.monthYearPicker.min) ? this.monthYearPicker.min.year : null;
|
26424
|
+
const maxYear = !ObjectUtil.isNull(this.monthYearPicker.max) ? this.monthYearPicker.max.year : null;
|
26425
|
+
if (!ObjectUtil.isNull(minYear) && !ObjectUtil.isNull(maxYear)) {
|
26426
|
+
disabled = index < minYear || index > maxYear;
|
26427
|
+
}
|
26428
|
+
else if (!ObjectUtil.isNull(minYear)) {
|
26429
|
+
disabled = index < minYear;
|
26430
|
+
}
|
26431
|
+
else if (!ObjectUtil.isNull(maxYear)) {
|
26432
|
+
disabled = index > maxYear;
|
26433
|
+
}
|
26434
|
+
}
|
26435
|
+
return disabled;
|
26436
|
+
// let disabled: boolean = false;
|
26437
|
+
// if (this._enabledYears && this._enabledYears.length > 0) {
|
26438
|
+
// disabled = this._enabledYears.findIndex(y => y === year) < 0;
|
26439
|
+
// }
|
26440
|
+
// if (this._disabledYears && this._disabledYears.length > 0) {
|
26441
|
+
// disabled = this._disabledYears.findIndex(y => y === year) >= 0;
|
26442
|
+
// }
|
26443
|
+
// return disabled;
|
26444
|
+
}
|
26445
|
+
};
|
23449
26446
|
CalendarMonthYearComponent.ctorParameters = () => [
|
23450
26447
|
{ type: ChangeDetectorRef }
|
23451
26448
|
];
|
@@ -23531,7 +26528,7 @@ class MonthPickerModel {
|
|
23531
26528
|
this.updateYearText();
|
23532
26529
|
}
|
23533
26530
|
}
|
23534
|
-
let nextUniqueId$
|
26531
|
+
let nextUniqueId$r = 0;
|
23535
26532
|
let MonthYearPickerComponent = MonthYearPickerComponent_1 = class MonthYearPickerComponent {
|
23536
26533
|
constructor(elementRef, _changeDetectorRef, _overlay, _ngZone, _viewContainerRef, scrollStrategy, _dir, _document) {
|
23537
26534
|
this.elementRef = elementRef;
|
@@ -23541,7 +26538,7 @@ let MonthYearPickerComponent = MonthYearPickerComponent_1 = class MonthYearPicke
|
|
23541
26538
|
this._viewContainerRef = _viewContainerRef;
|
23542
26539
|
this._dir = _dir;
|
23543
26540
|
this._document = _document;
|
23544
|
-
this._name = `gipi-date-range-${nextUniqueId$
|
26541
|
+
this._name = `gipi-date-range-${nextUniqueId$r++}`;
|
23545
26542
|
this._focusedElementBeforeOpen = null;
|
23546
26543
|
this._backdropHarnessClass = `${this._name}-backdrop`;
|
23547
26544
|
this._stateChanges = new Subject();
|
@@ -23908,7 +26905,7 @@ MonthYearPickerComponent = MonthYearPickerComponent_1 = __decorate([
|
|
23908
26905
|
'class': 'gipi-month-year-picker',
|
23909
26906
|
},
|
23910
26907
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
23911
|
-
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid
|
26908
|
+
styles: [":host{display:block;width:100%;min-width:0;max-width:100%;flex:1}.input-wrapper{display:flex;flex-direction:column;gap:.8rem;font-size:1.4rem;color:#696969}.input-wrapper .input-label{display:flex;align-items:center;gap:.4rem;color:#131313;line-height:1.6rem}.input-wrapper .input-label>span{font-size:1.6rem;line-height:1.6rem;color:#d14014}.input-wrapper .input-content{display:flex;font-family:inherit;font-size:inherit;color:inherit;height:4rem;background:#fff;border:1px solid #0000001f;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.6rem}.input-wrapper .input-content .input-element{padding:.75rem .8rem;border:none;outline:0;background-color:transparent;flex:1;color:inherit;caret-color:#696969;min-width:0}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.prefix:hover),.input-wrapper .input-content:not(.input-element:disabled):has(.suffix:hover){border-color:#6d6f73}.input-wrapper .input-content:not(.input-element:disabled):has(.input-element:enabled:focus){outline:0;outline-offset:0;box-shadow:0 0 0 .2rem #e0e1e2;border-color:#6d6f73}.input-wrapper .input-content:has(.input-element:disabled){color:#bbbdc1!important;border-color:#e0e1e2!important;background-color:#f5f5f6!important;cursor:not-allowed}.input-wrapper .input-content:has(.input-element:disabled) .suffix>mat-icon{color:#bbbdc1!important}.input-wrapper .input-content .input-element:disabled{cursor:not-allowed}.input-wrapper .input-content .suffix{display:flex;align-items:center;justify-content:center;padding-block:.75rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding-right:.8rem}.input-wrapper .input-content .suffix>mat-icon{width:2rem;height:2rem;font-size:2rem;color:#696969}.input-wrapper .input-help{flex:1;font-size:1rem;font-weight:500;margin-top:-.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.month-year-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-icon-button .month-year-toggle-default-icon{margin:auto}.btn-month-year-toggle{width:2rem!important;height:2rem!important;line-height:2rem!important}"]
|
23912
26909
|
}),
|
23913
26910
|
__param(5, Inject(GIPI_MONTH_YEAR_SCROLL_STRATEGY)),
|
23914
26911
|
__param(6, Optional()),
|
@@ -24031,7 +27028,7 @@ const GIPIServices = [
|
|
24031
27028
|
GIPIResizeService,
|
24032
27029
|
GIPIPaginationService,
|
24033
27030
|
];
|
24034
|
-
const ɵ0$
|
27031
|
+
const ɵ0$5 = {
|
24035
27032
|
parse: {
|
24036
27033
|
dateInput: 'DD/MM/YYYY',
|
24037
27034
|
},
|
@@ -24041,6 +27038,46 @@ const ɵ0$3 = {
|
|
24041
27038
|
dateA11yLabel: 'LL',
|
24042
27039
|
monthYearA11yLabel: 'MMMM YYYY',
|
24043
27040
|
},
|
27041
|
+
}, ɵ1$1 = {
|
27042
|
+
parse: {},
|
27043
|
+
display: {
|
27044
|
+
dateInput: {
|
27045
|
+
year: "numeric",
|
27046
|
+
month: "2-digit",
|
27047
|
+
day: "2-digit"
|
27048
|
+
},
|
27049
|
+
monthInput: {
|
27050
|
+
month: "long"
|
27051
|
+
},
|
27052
|
+
datetimeInput: {
|
27053
|
+
year: "numeric",
|
27054
|
+
month: "2-digit",
|
27055
|
+
day: "2-digit",
|
27056
|
+
hour: "2-digit",
|
27057
|
+
minute: "2-digit"
|
27058
|
+
},
|
27059
|
+
timeInput: {
|
27060
|
+
hour: "2-digit",
|
27061
|
+
minute: "2-digit"
|
27062
|
+
},
|
27063
|
+
monthYearLabel: {
|
27064
|
+
year: "numeric",
|
27065
|
+
month: "short"
|
27066
|
+
},
|
27067
|
+
dateA11yLabel: {
|
27068
|
+
year: "numeric",
|
27069
|
+
month: "long",
|
27070
|
+
day: "numeric"
|
27071
|
+
},
|
27072
|
+
monthYearA11yLabel: {
|
27073
|
+
year: "numeric",
|
27074
|
+
month: "long"
|
27075
|
+
},
|
27076
|
+
popupHeaderDateLabel: {
|
27077
|
+
day: "2-digit",
|
27078
|
+
month: "short",
|
27079
|
+
}
|
27080
|
+
}
|
24044
27081
|
};
|
24045
27082
|
let SharedModule = class SharedModule {
|
24046
27083
|
constructor(_injector) {
|
@@ -24106,6 +27143,7 @@ SharedModule = __decorate([
|
|
24106
27143
|
MentionModule,
|
24107
27144
|
DatepickerModule,
|
24108
27145
|
MonthYearPickerModule,
|
27146
|
+
DatetimepickerModule,
|
24109
27147
|
],
|
24110
27148
|
exports: [
|
24111
27149
|
GIPIComponents,
|
@@ -24152,6 +27190,7 @@ SharedModule = __decorate([
|
|
24152
27190
|
SelectButtonNextBatchComponent,
|
24153
27191
|
DatepickerModule,
|
24154
27192
|
MonthYearPickerModule,
|
27193
|
+
DatetimepickerModule,
|
24155
27194
|
],
|
24156
27195
|
entryComponents: [
|
24157
27196
|
GIPIConfirmationDialogComponent,
|
@@ -24173,7 +27212,11 @@ SharedModule = __decorate([
|
|
24173
27212
|
},
|
24174
27213
|
{
|
24175
27214
|
provide: MAT_DATE_FORMATS,
|
24176
|
-
useValue: ɵ0$
|
27215
|
+
useValue: ɵ0$5,
|
27216
|
+
},
|
27217
|
+
{
|
27218
|
+
provide: GIPI_DATETIME_FORMATS,
|
27219
|
+
useValue: ɵ1$1,
|
24177
27220
|
},
|
24178
27221
|
]
|
24179
27222
|
}),
|
@@ -24351,6 +27394,9 @@ class AbstractFindComponent extends AbstractComponent {
|
|
24351
27394
|
}
|
24352
27395
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
24353
27396
|
pageEvent = this.tablePageEventDTO;
|
27397
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
27398
|
+
pageEvent.pageIndex = 0;
|
27399
|
+
}
|
24354
27400
|
}
|
24355
27401
|
if (pageEvent) {
|
24356
27402
|
this.tablePageEventDTO = pageEvent;
|
@@ -25247,7 +28293,10 @@ let GIPIAbstractComponent = class GIPIAbstractComponent {
|
|
25247
28293
|
return this.baseService.router.url.split('/').filter(path => (path === 'view')).length > 0;
|
25248
28294
|
}
|
25249
28295
|
isListing() {
|
25250
|
-
return this.baseService.router.url.split('/').filter(path => (path === 'new') || (path === 'edit') || (path === 'view')).length === 0;
|
28296
|
+
return this.baseService.router.url.split('/').filter(path => (path === 'new') || (path === 'edit') || (path === 'view') || (path === 'clone')).length === 0;
|
28297
|
+
}
|
28298
|
+
isCloning() {
|
28299
|
+
return this.baseService.router.url.split('/').filter(path => (path === 'clone')).length > 0;
|
25251
28300
|
}
|
25252
28301
|
hasPermission(permission) {
|
25253
28302
|
if (StringUtil.isEmpty(permission)) {
|
@@ -25367,12 +28416,12 @@ let GIPIAbstractCrudComponent = class GIPIAbstractCrudComponent extends GIPIAbst
|
|
25367
28416
|
ngOnDestroy() {
|
25368
28417
|
super.ngOnDestroy();
|
25369
28418
|
}
|
25370
|
-
onInitForm() {
|
28419
|
+
onInitForm(version) {
|
25371
28420
|
try {
|
25372
28421
|
this.loading = true;
|
25373
28422
|
const id = this.activatedRoute.snapshot.params.id;
|
25374
28423
|
if (this.UUIDIsValid(id)) {
|
25375
|
-
this.abstractCrudService.getOne(id).toPromise().then(entity => {
|
28424
|
+
this.abstractCrudService.getOne(id, version).toPromise().then(entity => {
|
25376
28425
|
this.entity = entity;
|
25377
28426
|
this.onAfterGetOne();
|
25378
28427
|
this.loading = false;
|
@@ -25393,7 +28442,7 @@ let GIPIAbstractCrudComponent = class GIPIAbstractCrudComponent extends GIPIAbst
|
|
25393
28442
|
}
|
25394
28443
|
onAfterGetOne() { }
|
25395
28444
|
preSave(entity) { }
|
25396
|
-
save(entity, toGoBack = true) {
|
28445
|
+
save(entity, toGoBack = true, version) {
|
25397
28446
|
try {
|
25398
28447
|
this.loading = true;
|
25399
28448
|
if (ObjectUtil.isNull(entity)) {
|
@@ -25401,7 +28450,7 @@ let GIPIAbstractCrudComponent = class GIPIAbstractCrudComponent extends GIPIAbst
|
|
25401
28450
|
}
|
25402
28451
|
if (this.isValid(entity)) {
|
25403
28452
|
this.preSave(entity);
|
25404
|
-
this.abstractCrudService.save(entity).toPromise().then(resp => {
|
28453
|
+
this.abstractCrudService.save(entity, version).toPromise().then(resp => {
|
25405
28454
|
this.addSuccessMessage(INJECTOR.get(APP_MESSAGES).SUCCESS);
|
25406
28455
|
if (toGoBack) {
|
25407
28456
|
this.navigateByUrl(this.getPath(), [this.getPath()], true);
|
@@ -25542,6 +28591,9 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25542
28591
|
}
|
25543
28592
|
if (ObjectUtil.isNull(pageEvent) && !ObjectUtil.isNull(this.tablePageEventDTO)) {
|
25544
28593
|
pageEvent = this.tablePageEventDTO;
|
28594
|
+
if (ObjectUtil.hasPropertyInObj(pageEvent, 'pageIndex')) {
|
28595
|
+
pageEvent.pageIndex = 0;
|
28596
|
+
}
|
25545
28597
|
}
|
25546
28598
|
if (pageEvent) {
|
25547
28599
|
this.tablePageEventDTO = pageEvent;
|
@@ -25611,14 +28663,14 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25611
28663
|
this.navigateByUrl(this.getPath(), [this.getPath(), 'edit', id], true);
|
25612
28664
|
}
|
25613
28665
|
}
|
25614
|
-
deleteRegister(id, permission, fetchAgain = true) {
|
28666
|
+
deleteRegister(id, permission, fetchAgain = true, version) {
|
25615
28667
|
try {
|
25616
28668
|
id = this.handleEntityId(id);
|
25617
28669
|
if (ObjectUtil.isNull(id)) {
|
25618
28670
|
return;
|
25619
28671
|
}
|
25620
28672
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
25621
|
-
this._deleteRegister(id, fetchAgain);
|
28673
|
+
this._deleteRegister(id, fetchAgain, version);
|
25622
28674
|
}
|
25623
28675
|
else {
|
25624
28676
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -25628,7 +28680,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25628
28680
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
25629
28681
|
return;
|
25630
28682
|
}
|
25631
|
-
this._deleteRegister(id, fetchAgain);
|
28683
|
+
this._deleteRegister(id, fetchAgain, version);
|
25632
28684
|
}
|
25633
28685
|
}
|
25634
28686
|
catch (e) {
|
@@ -25640,7 +28692,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25640
28692
|
}
|
25641
28693
|
}
|
25642
28694
|
/** @Internal */
|
25643
|
-
_deleteRegister(id, fetchAgain = true) {
|
28695
|
+
_deleteRegister(id, fetchAgain = true, version) {
|
25644
28696
|
try {
|
25645
28697
|
this.baseService.confirmationService.confirm({
|
25646
28698
|
title: 'Confirmação',
|
@@ -25650,7 +28702,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25650
28702
|
this.loading = true;
|
25651
28703
|
this.page = this.newPage();
|
25652
28704
|
this.preDelete(id);
|
25653
|
-
this.abstractCrudService.delete(id).toPromise().then(() => {
|
28705
|
+
this.abstractCrudService.delete(id, version).toPromise().then(() => {
|
25654
28706
|
if (fetchAgain) {
|
25655
28707
|
this.findAll();
|
25656
28708
|
}
|
@@ -25667,14 +28719,14 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25667
28719
|
throw new Error(e);
|
25668
28720
|
}
|
25669
28721
|
}
|
25670
|
-
deleteAllRegister(idList, permission, fetchAgain = true) {
|
28722
|
+
deleteAllRegister(idList, permission, fetchAgain = true, version) {
|
25671
28723
|
try {
|
25672
28724
|
idList = this.handleEntityIdList(idList);
|
25673
28725
|
if (ObjectUtil.isNull(idList) || ArrayUtil.isEmpty(idList)) {
|
25674
28726
|
return;
|
25675
28727
|
}
|
25676
28728
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
25677
|
-
this._deleteAllRegister(idList, fetchAgain);
|
28729
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
25678
28730
|
}
|
25679
28731
|
else {
|
25680
28732
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -25684,7 +28736,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25684
28736
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
25685
28737
|
return;
|
25686
28738
|
}
|
25687
|
-
this._deleteAllRegister(idList, fetchAgain);
|
28739
|
+
this._deleteAllRegister(idList, fetchAgain, version);
|
25688
28740
|
}
|
25689
28741
|
}
|
25690
28742
|
catch (e) {
|
@@ -25696,7 +28748,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25696
28748
|
}
|
25697
28749
|
}
|
25698
28750
|
/** @Internal */
|
25699
|
-
_deleteAllRegister(idList, fetchAgain = true) {
|
28751
|
+
_deleteAllRegister(idList, fetchAgain = true, version) {
|
25700
28752
|
try {
|
25701
28753
|
this.baseService.confirmationService.confirm({
|
25702
28754
|
title: 'Confirmação',
|
@@ -25706,7 +28758,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25706
28758
|
this.loading = true;
|
25707
28759
|
this.page = this.newPage();
|
25708
28760
|
this.preDelete();
|
25709
|
-
this.abstractCrudService.deleteAll(idList).toPromise().then(() => {
|
28761
|
+
this.abstractCrudService.deleteAll(idList, version).toPromise().then(() => {
|
25710
28762
|
if (fetchAgain) {
|
25711
28763
|
this.findAll();
|
25712
28764
|
}
|
@@ -25752,14 +28804,14 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25752
28804
|
this.viewRegister(id, permission);
|
25753
28805
|
}
|
25754
28806
|
}
|
25755
|
-
enableOrDisableRegister(action, id, permission, fetchAgain = true) {
|
28807
|
+
enableOrDisableRegister(action, id, permission, fetchAgain = true, version) {
|
25756
28808
|
try {
|
25757
28809
|
id = this.handleEntityId(id);
|
25758
28810
|
if (ObjectUtil.isNull(id)) {
|
25759
28811
|
return;
|
25760
28812
|
}
|
25761
28813
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
25762
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
28814
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
25763
28815
|
}
|
25764
28816
|
else {
|
25765
28817
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -25769,7 +28821,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25769
28821
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
25770
28822
|
return;
|
25771
28823
|
}
|
25772
|
-
this._enableOrDisableRegister(action, id, fetchAgain);
|
28824
|
+
this._enableOrDisableRegister(action, id, fetchAgain, version);
|
25773
28825
|
}
|
25774
28826
|
}
|
25775
28827
|
catch (e) {
|
@@ -25781,7 +28833,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25781
28833
|
}
|
25782
28834
|
}
|
25783
28835
|
/** @Internal */
|
25784
|
-
_enableOrDisableRegister(action, id, fetchAgain = true) {
|
28836
|
+
_enableOrDisableRegister(action, id, fetchAgain = true, version) {
|
25785
28837
|
try {
|
25786
28838
|
this.baseService.confirmationService.confirm({
|
25787
28839
|
title: 'Confirmação',
|
@@ -25790,7 +28842,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25790
28842
|
this.setFilterSessionStorage();
|
25791
28843
|
this.loading = true;
|
25792
28844
|
this.page = this.newPage();
|
25793
|
-
this.abstractCrudService.enableOrDisable(id, action).toPromise().then(() => {
|
28845
|
+
this.abstractCrudService.enableOrDisable(id, action, version).toPromise().then(() => {
|
25794
28846
|
if (fetchAgain) {
|
25795
28847
|
this.findAll();
|
25796
28848
|
}
|
@@ -25807,14 +28859,14 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25807
28859
|
throw new Error(e);
|
25808
28860
|
}
|
25809
28861
|
}
|
25810
|
-
enableAndDisableAllRegister(action, idList, permission, fetchAgain = true) {
|
28862
|
+
enableAndDisableAllRegister(action, idList, permission, fetchAgain = true, version) {
|
25811
28863
|
try {
|
25812
28864
|
idList = this.handleEntityIdList(idList);
|
25813
28865
|
if (ObjectUtil.isNull(idList) || ArrayUtil.isEmpty(idList)) {
|
25814
28866
|
return;
|
25815
28867
|
}
|
25816
28868
|
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
25817
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
28869
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
25818
28870
|
}
|
25819
28871
|
else {
|
25820
28872
|
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
@@ -25824,7 +28876,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25824
28876
|
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
25825
28877
|
return;
|
25826
28878
|
}
|
25827
|
-
this._enableAndDisableAllRegister(action, idList, fetchAgain);
|
28879
|
+
this._enableAndDisableAllRegister(action, idList, fetchAgain, version);
|
25828
28880
|
}
|
25829
28881
|
}
|
25830
28882
|
catch (e) {
|
@@ -25836,7 +28888,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25836
28888
|
}
|
25837
28889
|
}
|
25838
28890
|
/** @Internal */
|
25839
|
-
_enableAndDisableAllRegister(action, idList, fetchAgain = true) {
|
28891
|
+
_enableAndDisableAllRegister(action, idList, fetchAgain = true, version) {
|
25840
28892
|
try {
|
25841
28893
|
this.baseService.confirmationService.confirm({
|
25842
28894
|
title: 'Confirmação',
|
@@ -25845,7 +28897,7 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25845
28897
|
this.setFilterSessionStorage();
|
25846
28898
|
this.loading = true;
|
25847
28899
|
this.page = this.newPage();
|
25848
|
-
this.abstractCrudService.enableOrDisableAll(idList, action).toPromise().then(() => {
|
28900
|
+
this.abstractCrudService.enableOrDisableAll(idList, action, version).toPromise().then(() => {
|
25849
28901
|
if (fetchAgain) {
|
25850
28902
|
this.findAll();
|
25851
28903
|
}
|
@@ -25862,6 +28914,27 @@ let GIPIAbstractFindComponent = class GIPIAbstractFindComponent extends GIPIAbst
|
|
25862
28914
|
throw new Error(e);
|
25863
28915
|
}
|
25864
28916
|
}
|
28917
|
+
cloneRegister(id, permission) {
|
28918
|
+
id = this.handleEntityId(id);
|
28919
|
+
if (ObjectUtil.isNull(id)) {
|
28920
|
+
return;
|
28921
|
+
}
|
28922
|
+
if (StringUtil.isEmpty(permission) && ObjectUtil.isNull(this.basePermissionList)) {
|
28923
|
+
this.setFilterSessionStorage();
|
28924
|
+
this.navigateByUrl(this.getPath(), [this.getPath(), 'new', 'clone'], true);
|
28925
|
+
}
|
28926
|
+
else {
|
28927
|
+
if (StringUtil.isEmpty(permission) && !ObjectUtil.isNull(this.basePermissionList)) {
|
28928
|
+
permission = this.basePermissionList.MAKE;
|
28929
|
+
}
|
28930
|
+
if (!this.hasPermission(permission)) {
|
28931
|
+
this.addWarningMessage(INJECTOR.get(APP_MESSAGES).NOT_PERMISSION);
|
28932
|
+
return;
|
28933
|
+
}
|
28934
|
+
this.setFilterSessionStorage();
|
28935
|
+
this.navigateByUrl(this.getPath(), [this.getPath(), 'new', 'clone', id], true);
|
28936
|
+
}
|
28937
|
+
}
|
25865
28938
|
clear() {
|
25866
28939
|
this.baseService.sessionStorageService.remove('filter');
|
25867
28940
|
this.page = this.newPage();
|
@@ -27089,5 +30162,5 @@ const MAT_NATIVE_DATE_FORMATS = {
|
|
27089
30162
|
* Generated bundle index. Do not edit.
|
27090
30163
|
*/
|
27091
30164
|
|
27092
|
-
export { APP_MESSAGES, AbstractComponent, AbstractCrudComponent, AbstractCrudService, AbstractDTO, AbstractFindComponent, AbstractFindService, AbstractModel, AbstractService, AlertComponent, Archive, ArrayUtil, AuthGuard, AuthInterceptor, AuthenticationService, BaseUser, BreakpointEnum, BreakpointObserverService, BrowserUtil, ButtonComponent, CalendarMonthYearComponent, CardComponent, ChartDTO, CheckboxComponent, ConfirmationDTO, ConfirmationService, CoreModule, CriteriaOperationEnum, CriteriaSortDirectionEnum, CurrencyUtil, DEFAULT_MESSAGES, DateAdapter, DateRange, DateRangePickerComponent, DateUtil, DatepickerModule, DefaultMatCalendarRangeStrategy, DialogDTO, DialogService, DocumentUtil, EmailUtil, ErrorInterceptor, FilterDTO, GIPIAbstractComponent, GIPIAbstractCrudComponent, GIPIAbstractCrudService, GIPIAbstractDTO, GIPIAbstractFilterModel, GIPIAbstractFindComponent, GIPIAbstractFormComponent, GIPIAbstractModel, GIPIAbstractService, GIPIActionRowComponent, GIPIAppliedFilter, GIPIAutowired, GIPIBadgeComponent, GIPIBaseService, GIPIBreakpointService, GIPIButtonComponent, GIPICardComponent, GIPIColDirective, GIPIConfirmationDialogComponent, GIPIConnectedOverlayScrollHandler, GIPIDomHandler, GIPIDropdownMenuComponent, GIPIDynamicTabDirective, GIPIEmptyStateComponent, GIPIExpansionPanelComponent, GIPIFileDragAndDropComponent, GIPIFileService, GIPIFooterComponent, GIPIFormFieldComponent, GIPIHelpfulTipComponent, GIPIInfiniteScrollDirective, GIPIInputCheckboxComponent, GIPIInputCurrencyComponent, GIPIInputMonthPickerComponent, GIPIInputPhoneComponent, GIPIInputSearchComponent, GIPIInputSelectComponent, GIPIInputSelectEnumComponent, GIPIInputSelectListboxComponent, GIPIInputSelectPagedComponent, GIPIInputSelectRadioComponent, GIPINotificationComponent, GIPINoveltiesComponent, GIPIOverlayComponent, GIPIOverlayService, GIPIPageEvent, GIPIPageModel, GIPIPaginatePipe, GIPIPaginationControlsDirective, GIPIPaginationService, GIPIPasswordRequerimentsComponent, GIPIPopoverComponent, GIPIPopoverTarget, GIPIPopoverTrigger, GIPIRadioGroupComponent, GIPIRangePageComponent, GIPIRangeSliderComponent, GIPIResizeService, GIPIRowDirective, GIPISelectButtonComponent, GIPISelectComponent, GIPISessionStorageService, GIPISidenavComponent, GIPISidenavContainerComponent, GIPISkeletonComponent, GIPISkeletonDirective, GIPISlideToggleComponent, GIPISortDirectionEnum, GIPISortModel, GIPISplitButtonComponent, GIPIStepperComponent, GIPITabComponent, GIPITabGroupComponent, GIPITableBodyComponent, GIPITableComponent, GIPITableFooterComponent, GIPITableHeaderComponent, GIPITablePaginationComponent, GIPITableProgressBarComponent, GIPITemplateDirective, GIPITextareaComponent, GIPIToolbarComponent, GIPITopNavComponent, GIPIUserProfileComponent, GIPI_BREAKPOINTS, GIPI_CUSTOM_BREAKPOINTS_PROVIDER, GIPI_MONTH_YEAR_SCROLL_STRATEGY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY_PROVIDER, INJECTOR, IconComponent, InputComponent, InputCurrencyComponent, InputFileComponent, InputListboxDTO, ItssTemplate, LoadingComponent, LoadingOverlayComponent, LocalTimeEnum, LocalTimePipe, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_DATE_LOCALE_PROVIDER, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_NATIVE_DATE_FORMATS, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, MaxRangeDirective, MaxRangeSelectionStrategy, MenuDTO, MenuTypeEnum, MessageDTO, MessageService, MonthPickerModel, MonthYear, MonthYearPickerComponent, MonthYearPickerModule, MultitenantModel, NativeDateAdapter, NavService, NumberUtil, ObjectUtil, OverlayPanelComponent, POINTS_NAME, PageDTO, PasswordUtil, Permission, PermissionGuard, PhoneMaskDirective, PhoneUtil, Platform, PopoverComponent, PopoverRef, PopoverService, PresetRangeComponent, RadioButtonEnum, RadioGroupEntityComponent, RadioGroupEnumComponent, RangePage, Role, SelectButtonAddComponent, SelectButtonNextBatchComponent, SelectEntityComponent, SelectEntityPagedComponent, SelectEnumComponent, SelectMonthPeriodComponent, SelectNoEntriesFoundDirective, SelectSearchClearDirective, SelectSearchComponent, SharedModule, SlideToggleComponent, SortDTO, SortDirectionEnum, SortModel, StepperComponent, StringUtil, SvgRegisterService, TabDTO, TabModel, TableColumnBuilder, TableColumnBuilderModel, TableColumnDTO, TableColumnModel, TableComponent, TableScrolledComponent, TimeUtil, TokenDTO, URLParamsUtil, UUIDUtil, customCurrencyMaskConfig, getReflectType, gridResponsiveMap, matDatepickerAnimations, nextUniqueId$o as nextUniqueId, siderResponsiveMap, transformPopover, yearsPerPage$1 as yearsPerPage, yearsPerRow, ƟCMP, ƟFAC, ƟPROV, ɵ0$
|
30165
|
+
export { APP_MESSAGES, AbstractComponent, AbstractCrudComponent, AbstractCrudService, AbstractDTO, AbstractFindComponent, AbstractFindService, AbstractModel, AbstractService, AlertComponent, Archive, ArrayUtil, AuthGuard, AuthInterceptor, AuthenticationService, BaseUser, BreakpointEnum, BreakpointObserverService, BrowserUtil, ButtonComponent, CLOCK_INNER_RADIUS, CLOCK_OUTER_RADIUS, CLOCK_RADIUS, CLOCK_TICK_RADIUS, CalendarMonthYearComponent, CardComponent, ChartDTO, CheckboxComponent, ConfirmationDTO, ConfirmationService, CoreModule, CriteriaOperationEnum, CriteriaSortDirectionEnum, CurrencyUtil, DEFAULT_MESSAGES, DateAdapter, DateRange, DateRangePickerComponent, DateUtil, DatepickerModule, DatetimepickerModule, DefaultMatCalendarRangeStrategy, DialogDTO, DialogService, DocumentUtil, EmailUtil, ErrorInterceptor, FilterDTO, GIPIAbstractComponent, GIPIAbstractCrudComponent, GIPIAbstractCrudService, GIPIAbstractDTO, GIPIAbstractFilterModel, GIPIAbstractFindComponent, GIPIAbstractFormComponent, GIPIAbstractModel, GIPIAbstractService, GIPIActionRowComponent, GIPIAppliedFilter, GIPIAutowired, GIPIBadgeComponent, GIPIBaseService, GIPIBreakpointService, GIPIButtonComponent, GIPICardComponent, GIPIColDirective, GIPIConfirmationDialogComponent, GIPIConnectedOverlayScrollHandler, GIPIDateAndTimePickerComponent, GIPIDatetimeAdapter, GIPIDatetimepickerCalendarBodyComponent, GIPIDatetimepickerCalendarCell, GIPIDatetimepickerCalendarComponent, GIPIDatetimepickerClockComponent, GIPIDatetimepickerComponent, GIPIDatetimepickerContentComponent, GIPIDatetimepickerFilterType, GIPIDatetimepickerInputDirective, GIPIDatetimepickerInputEvent, GIPIDatetimepickerMonthViewComponent, GIPIDatetimepickerToggleComponent, GIPIDatetimepickerYearViewComponent, GIPIDomHandler, GIPIDropdownMenuComponent, GIPIDynamicTabDirective, GIPIEmptyStateComponent, GIPIExpansionPanelComponent, GIPIFileDragAndDropComponent, GIPIFileService, GIPIFooterComponent, GIPIFormFieldComponent, GIPIHelpfulTipComponent, GIPIInfiniteScrollDirective, GIPIInputCheckboxComponent, GIPIInputCurrencyComponent, GIPIInputMonthPickerComponent, GIPIInputPhoneComponent, GIPIInputSearchComponent, GIPIInputSelectComponent, GIPIInputSelectEnumComponent, GIPIInputSelectListboxComponent, GIPIInputSelectPagedComponent, GIPIInputSelectRadioComponent, GIPINativeDatetimeAdapter, GIPINativeDatetimeModule, GIPINotificationComponent, GIPINoveltiesComponent, GIPIOverlayComponent, GIPIOverlayService, GIPIPageEvent, GIPIPageModel, GIPIPaginatePipe, GIPIPaginationControlsDirective, GIPIPaginationService, GIPIPasswordRequerimentsComponent, GIPIPopoverComponent, GIPIPopoverTarget, GIPIPopoverTrigger, GIPIRadioGroupComponent, GIPIRangePageComponent, GIPIRangeSliderComponent, GIPIResizeService, GIPIRowDirective, GIPISelectButtonComponent, GIPISelectComponent, GIPISessionStorageService, GIPISidenavComponent, GIPISidenavContainerComponent, GIPISkeletonComponent, GIPISkeletonDirective, GIPISlideToggleComponent, GIPISortDirectionEnum, GIPISortModel, GIPISplitButtonComponent, GIPIStepperComponent, GIPITabComponent, GIPITabGroupComponent, GIPITableBodyComponent, GIPITableComponent, GIPITableFooterComponent, GIPITableHeaderComponent, GIPITablePaginationComponent, GIPITableProgressBarComponent, GIPITemplateDirective, GIPITextareaComponent, GIPIToolbarComponent, GIPITopNavComponent, GIPIUserProfileComponent, GIPI_BREAKPOINTS, GIPI_CUSTOM_BREAKPOINTS_PROVIDER, GIPI_DATETIMEPICKER_VALIDATORS, GIPI_DATETIMEPICKER_VALUE_ACCESSOR, GIPI_DATETIME_FORMATS, GIPI_MONTH_YEAR_SCROLL_STRATEGY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY, GIPI_MONTH_YEAR_SCROLL_STRATEGY_FACTORY_PROVIDER, GIPI_NATIVE_DATETIME_FORMATS, INJECTOR, IconComponent, InputComponent, InputCurrencyComponent, InputFileComponent, InputListboxDTO, ItssTemplate, LoadingComponent, LoadingOverlayComponent, LocalTimeEnum, LocalTimePipe, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MAT_DATE_LOCALE_FACTORY, MAT_DATE_LOCALE_PROVIDER, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_NATIVE_DATE_FORMATS, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, MaxRangeDirective, MaxRangeSelectionStrategy, MenuDTO, MenuTypeEnum, MessageDTO, MessageService, MonthPickerModel, MonthYear, MonthYearPickerComponent, MonthYearPickerModule, MultitenantModel, NativeDateAdapter, NativeDatetimeModule, NavService, NumberUtil, ObjectUtil, OverlayPanelComponent, POINTS_NAME, PageDTO, PasswordUtil, Permission, PermissionGuard, PhoneMaskDirective, PhoneUtil, Platform, PopoverComponent, PopoverRef, PopoverService, PresetRangeComponent, RadioButtonEnum, RadioGroupEntityComponent, RadioGroupEnumComponent, RangePage, Role, SelectButtonAddComponent, SelectButtonNextBatchComponent, SelectEntityComponent, SelectEntityPagedComponent, SelectEnumComponent, SelectMonthPeriodComponent, SelectNoEntriesFoundDirective, SelectSearchClearDirective, SelectSearchComponent, SharedModule, SlideToggleComponent, SortDTO, SortDirectionEnum, SortModel, StepperComponent, StringUtil, SvgRegisterService, TabDTO, TabModel, TableColumnBuilder, TableColumnBuilderModel, TableColumnDTO, TableColumnModel, TableComponent, TableScrolledComponent, TimeUtil, TokenDTO, URLParamsUtil, UUIDUtil, customCurrencyMaskConfig, getReflectType, gridResponsiveMap, matDatepickerAnimations, nextUniqueId$o as nextUniqueId, siderResponsiveMap, transformPopover, yearsPerPage$1 as yearsPerPage, yearsPerRow, ƟCMP, ƟFAC, ƟPROV, ɵ0$5 as ɵ0, ɵ1$1 as ɵ1, MAT_DATE_RANGE_INPUT_PARENT as ɵa, MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY as ɵb, MAT_CALENDAR_RANGE_STRATEGY_PROVIDER as ɵc, MatDatepickerBase as ɵd, MAT_FORM_FIELD as ɵe, MatDatepickerInputBase as ɵf, GIPINgConfig as ɵg, GIPIChipsComponent as ɵh, GIPIFileDragAndDropDirective as ɵi, TextareaComponent as ɵj, UpperCaseDirective as ɵk, LowerCaseDirective as ɵl, SpaceDropDirective as ɵm, InputSelectInfiniteScrollDirective as ɵn, ITSS_SELECT_SEARCH_DEFAULT_OPTIONS as ɵo, MaterialModule as ɵq, DatepickerComponent as ɵr, slideCalendar as ɵs, GIPIDatetimepickerMultiYearViewComponent as ɵt };
|
27093
30166
|
//# sourceMappingURL=gipisistemas-ng-core.js.map
|