ecabs-components 1.1.57 → 1.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/esm2022/lib/base/consts/error-messages.consts.mjs +13 -1
- package/esm2022/lib/base/directives/date-mask.directive.mjs +56 -80
- package/esm2022/lib/base/directives/time-mask.directive.mjs +12 -35
- package/esm2022/lib/base/directives/time-range.directive.mjs +6 -32
- package/esm2022/lib/base/utils/time-mask.util.mjs +87 -0
- package/esm2022/lib/ecabs-button-toggle/ecabs-button-toggle.component.mjs +2 -2
- package/esm2022/lib/ecabs-buttons-v2/ecabs-buttons-v2.component.mjs +2 -2
- package/esm2022/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.component.mjs +105 -0
- package/esm2022/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.module.mjs +22 -0
- package/esm2022/lib/ecabs-date-range-picker-v2/ecabs-date-range-picker-v2.component.mjs +4 -6
- package/esm2022/lib/ecabs-date-time-picker/ecabs-date-time-picker.component.mjs +31 -11
- package/esm2022/lib/ecabs-date-time-range-picker/ecabs-date-time-range-picker.component.mjs +3 -3
- package/esm2022/lib/ecabs-input-range/ecabs-input-range.component.mjs +188 -0
- package/esm2022/lib/ecabs-input-range/ecabs-input-range.module.mjs +40 -0
- package/esm2022/lib/ecabs-time-range-input-v2/config.model.mjs +2 -0
- package/esm2022/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.component.mjs +167 -0
- package/esm2022/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.module.mjs +32 -0
- package/esm2022/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.service.mjs +29 -0
- package/esm2022/lib/ecabs-timepicker/ecabs-timepicker.component.mjs +3 -55
- package/esm2022/public-api.mjs +8 -1
- package/fesm2022/ecabs-components.mjs +734 -290
- package/fesm2022/ecabs-components.mjs.map +1 -1
- package/lib/base/directives/date-mask.directive.d.ts +6 -7
- package/lib/base/directives/time-mask.directive.d.ts +2 -3
- package/lib/base/directives/time-range.directive.d.ts +1 -2
- package/lib/base/utils/time-mask.util.d.ts +3 -0
- package/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.component.d.ts +29 -0
- package/lib/ecabs-checkbox-v2/ecabs-checkbox-v2.module.d.ts +12 -0
- package/lib/ecabs-date-time-picker/ecabs-date-time-picker.component.d.ts +4 -2
- package/lib/ecabs-input-range/ecabs-input-range.component.d.ts +44 -0
- package/lib/ecabs-input-range/ecabs-input-range.module.d.ts +13 -0
- package/lib/ecabs-time-range-input-v2/config.model.d.ts +5 -0
- package/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.component.d.ts +51 -0
- package/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.module.d.ts +11 -0
- package/lib/ecabs-time-range-input-v2/ecabs-time-range-input-v2.service.d.ts +12 -0
- package/lib/ecabs-timepicker/ecabs-timepicker.component.d.ts +0 -5
- package/package.json +3 -2
- package/public-api.d.ts +7 -0
- package/src/assets/styles/scss/utilities/_variables.scss +1 -0
- package/src/assets/styles/tailwind/index.scss +1 -1
- package/esm2022/lib/base/consts/date-mask.consts.mjs +0 -76
- package/lib/base/consts/date-mask.consts.d.ts +0 -7
|
@@ -37,7 +37,7 @@ import Holidays from 'date-holidays';
|
|
|
37
37
|
import enGbLocale from 'date-fns/locale/en-GB';
|
|
38
38
|
import * as i6 from '@angular/material/datepicker';
|
|
39
39
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
40
|
-
import
|
|
40
|
+
import { Maskito } from '@maskito/core';
|
|
41
41
|
import { parsePhoneNumber, getExampleNumber, parsePhoneNumberFromString, AsYouType } from 'libphonenumber-js';
|
|
42
42
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
43
43
|
import * as i7$1 from '@angular/material/menu';
|
|
@@ -65,10 +65,10 @@ import { NgxSliderModule } from '@angular-slider/ngx-slider';
|
|
|
65
65
|
import * as i3$5 from '@angular/platform-browser';
|
|
66
66
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
67
67
|
import { Platform } from '@angular/cdk/platform';
|
|
68
|
+
import { isEqual as isEqual$1 } from 'lodash';
|
|
68
69
|
import * as i4$6 from '@angular/material/autocomplete';
|
|
69
70
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
70
71
|
import { NgxPhosphorIconsLightFileModule } from 'ngx-phosphor-icons';
|
|
71
|
-
import { isEqual as isEqual$1 } from 'lodash';
|
|
72
72
|
|
|
73
73
|
class EcabsSpinnerComponent {
|
|
74
74
|
size = 'medium';
|
|
@@ -219,11 +219,11 @@ class ButtonsV2Component {
|
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonsV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonsV2Component, selector: "ecabs-buttons-v2", inputs: { disabled: "disabled", loading: "loading", size: "size", type: "type", style: "style", color: "color", fullWidth: "fullWidth" }, host: { properties: { "style.width": "this.hostWidth", "class": "this.classAttr" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"style\">\r\n <button \r\n mat-flat-button \r\n *ngSwitchCase=\"'flat'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-stroked-button \r\n *ngSwitchCase=\"'stroked'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-raised-button \r\n *ngSwitchCase=\"'raised'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-button \r\n *ngSwitchCase=\"'basic'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <ecabs-loading-spinner \r\n size=\"tiny\" \r\n *ngIf=\"loading\"\r\n >\r\n </ecabs-loading-spinner>\r\n <ng-container *ngIf=\"!loading\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--small.mat-mdc-outlined-button,.ecabs-button-v2--small.mat-mdc-unelevated-button,.ecabs-button-v2--small.mat-mdc-raised-button{height:32px;min-width:90px;padding:0 12px;font-size:12px;font-weight:600;line-height:18px;letter-spacing:0;border-radius
|
|
222
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonsV2Component, selector: "ecabs-buttons-v2", inputs: { disabled: "disabled", loading: "loading", size: "size", type: "type", style: "style", color: "color", fullWidth: "fullWidth" }, host: { properties: { "style.width": "this.hostWidth", "class": "this.classAttr" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"style\">\r\n <button \r\n mat-flat-button \r\n *ngSwitchCase=\"'flat'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-stroked-button \r\n *ngSwitchCase=\"'stroked'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-raised-button \r\n *ngSwitchCase=\"'raised'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-button \r\n *ngSwitchCase=\"'basic'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <ecabs-loading-spinner \r\n size=\"tiny\" \r\n *ngIf=\"loading\"\r\n >\r\n </ecabs-loading-spinner>\r\n <ng-container *ngIf=\"!loading\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--small.mat-mdc-outlined-button,.ecabs-button-v2--small.mat-mdc-unelevated-button,.ecabs-button-v2--small.mat-mdc-raised-button{height:32px;min-width:90px;padding:0 12px;font-size:12px;font-weight:600;line-height:18px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--medium.mat-mdc-button,.ecabs-button-v2--medium.mat-mdc-outlined-button,.ecabs-button-v2--medium.mat-mdc-unelevated-button,.ecabs-button-v2--medium.mat-mdc-raised-button{height:40px;min-width:120px;padding:0 16px;font-size:14px;font-weight:600;line-height:21px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--large.mat-mdc-button,.ecabs-button-v2--large.mat-mdc-outlined-button,.ecabs-button-v2--large.mat-mdc-unelevated-button,.ecabs-button-v2--large.mat-mdc-raised-button{height:48px;min-width:140px;padding:0 20px;font-size:16px;font-weight:600;line-height:24px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--medium.mat-mdc-button,.ecabs-button-v2--large.mat-mdc-button{color:var(--color-gray-500)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: EcabsSpinnerComponent, selector: "ecabs-loading-spinner", inputs: ["size"] }] });
|
|
223
223
|
}
|
|
224
224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonsV2Component, decorators: [{
|
|
225
225
|
type: Component,
|
|
226
|
-
args: [{ selector: 'ecabs-buttons-v2', template: "<ng-container [ngSwitch]=\"style\">\r\n <button \r\n mat-flat-button \r\n *ngSwitchCase=\"'flat'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-stroked-button \r\n *ngSwitchCase=\"'stroked'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-raised-button \r\n *ngSwitchCase=\"'raised'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-button \r\n *ngSwitchCase=\"'basic'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <ecabs-loading-spinner \r\n size=\"tiny\" \r\n *ngIf=\"loading\"\r\n >\r\n </ecabs-loading-spinner>\r\n <ng-container *ngIf=\"!loading\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--small.mat-mdc-outlined-button,.ecabs-button-v2--small.mat-mdc-unelevated-button,.ecabs-button-v2--small.mat-mdc-raised-button{height:32px;min-width:90px;padding:0 12px;font-size:12px;font-weight:600;line-height:18px;letter-spacing:0;border-radius
|
|
226
|
+
args: [{ selector: 'ecabs-buttons-v2', template: "<ng-container [ngSwitch]=\"style\">\r\n <button \r\n mat-flat-button \r\n *ngSwitchCase=\"'flat'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-stroked-button \r\n *ngSwitchCase=\"'stroked'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-raised-button \r\n *ngSwitchCase=\"'raised'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [color]=\"color\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n <button \r\n mat-button \r\n *ngSwitchCase=\"'basic'\" \r\n [ngClass]=\"buttonClasses\" \r\n [class]=\"sizeClass\" \r\n [disabled]=\"disabled\" \r\n [type]=\"type\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\r\n </button>\r\n</ng-container>\r\n\r\n<ng-template #content>\r\n <ecabs-loading-spinner \r\n size=\"tiny\" \r\n *ngIf=\"loading\"\r\n >\r\n </ecabs-loading-spinner>\r\n <ng-container *ngIf=\"!loading\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n <ng-content></ng-content>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--small.mat-mdc-outlined-button,.ecabs-button-v2--small.mat-mdc-unelevated-button,.ecabs-button-v2--small.mat-mdc-raised-button{height:32px;min-width:90px;padding:0 12px;font-size:12px;font-weight:600;line-height:18px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--medium.mat-mdc-button,.ecabs-button-v2--medium.mat-mdc-outlined-button,.ecabs-button-v2--medium.mat-mdc-unelevated-button,.ecabs-button-v2--medium.mat-mdc-raised-button{height:40px;min-width:120px;padding:0 16px;font-size:14px;font-weight:600;line-height:21px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--large.mat-mdc-button,.ecabs-button-v2--large.mat-mdc-outlined-button,.ecabs-button-v2--large.mat-mdc-unelevated-button,.ecabs-button-v2--large.mat-mdc-raised-button{height:48px;min-width:140px;padding:0 20px;font-size:16px;font-weight:600;line-height:24px;letter-spacing:0;border-radius:.5rem;text-align:center}.ecabs-button-v2--small.mat-mdc-button,.ecabs-button-v2--medium.mat-mdc-button,.ecabs-button-v2--large.mat-mdc-button{color:var(--color-gray-500)}\n"] }]
|
|
227
227
|
}], propDecorators: { disabled: [{
|
|
228
228
|
type: Input
|
|
229
229
|
}], loading: [{
|
|
@@ -298,7 +298,7 @@ class EcabsButtonToggleComponent {
|
|
|
298
298
|
useExisting: forwardRef(() => EcabsButtonToggleComponent),
|
|
299
299
|
multi: true,
|
|
300
300
|
},
|
|
301
|
-
], ngImport: i0, template: "<mat-button-toggle-group\r\n class=\"ecabs-button-toggle\"\r\n [ngClass]=\"'ecabs-button-toggle--' + size\"\r\n [multiple]=\"multiple\"\r\n [value]=\"value\" \r\n [disabled]=\"isDisabled\"\r\n (change)=\"onGroupChange($event)\"\r\n> \r\n <mat-button-toggle\r\n *ngFor=\"let option of options; trackBy: trackByOptionValue\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.disabled\">\r\n {{ option.label }}\r\n </mat-button-toggle>\r\n</mat-button-toggle-group>", styles: [".ecabs-button-toggle{border-radius
|
|
301
|
+
], ngImport: i0, template: "<mat-button-toggle-group\r\n class=\"ecabs-button-toggle\"\r\n [ngClass]=\"'ecabs-button-toggle--' + size\"\r\n [multiple]=\"multiple\"\r\n [value]=\"value\" \r\n [disabled]=\"isDisabled\"\r\n (change)=\"onGroupChange($event)\"\r\n> \r\n <mat-button-toggle\r\n *ngFor=\"let option of options; trackBy: trackByOptionValue\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.disabled\">\r\n {{ option.label }}\r\n </mat-button-toggle>\r\n</mat-button-toggle-group>", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-button-toggle{border-radius:.5rem;box-shadow:none;border:none;background-color:var(--color-gray-100);padding:6px;display:inline-flex;align-items:center}.ecabs-button-toggle.mat-button-toggle-group-appearance-standard{border:none}.ecabs-button-toggle .mat-button-toggle{border:none!important;background:transparent;color:var(--color-gray-500);border-radius:.5rem;transition:background-color .2s ease,color .2s ease}.ecabs-button-toggle .mat-button-toggle:hover{background-color:var(--color-gray-100)}.ecabs-button-toggle .mat-button-toggle+.mat-button-toggle{border-left:none}.ecabs-button-toggle .mat-button-toggle-checked{color:var(--color-gray-900)}.ecabs-button-toggle .mat-button-toggle-checked .mat-button-toggle-button{background-color:var(--color-white);border-color:var(--color-gray-200);box-shadow:0 1px 2px #0000000f}.ecabs-button-toggle .mat-button-toggle-checked .mat-button-toggle-label-content{color:var(--color-gray-900)}.ecabs-button-toggle .mat-button-toggle-disabled{color:var(--color-gray-400)}.ecabs-button-toggle .mat-button-toggle-disabled .mat-button-toggle-button{cursor:not-allowed;opacity:.6}.ecabs-button-toggle .mat-button-toggle-button{border-radius:.5rem;border:1px solid transparent;display:flex;align-items:center;justify-content:center}.ecabs-button-toggle .mat-button-toggle-label-content{font-weight:500;font-family:inherit;line-height:1;display:inline-flex;align-items:center;justify-content:center}.ecabs-button-toggle--small .mat-button-toggle{height:32px}.ecabs-button-toggle--small .mat-button-toggle .mat-button-toggle-button{height:32px;min-width:72px}.ecabs-button-toggle--small .mat-button-toggle .mat-button-toggle-label-content{font-size:12px;padding:0 12px}.ecabs-button-toggle--medium .mat-button-toggle{height:40px}.ecabs-button-toggle--medium .mat-button-toggle .mat-button-toggle-button{height:40px;min-width:120px}.ecabs-button-toggle--medium .mat-button-toggle .mat-button-toggle-label-content{font-size:14px;padding:0 20px}.ecabs-button-toggle--large .mat-button-toggle{height:48px}.ecabs-button-toggle--large .mat-button-toggle .mat-button-toggle-button{height:48px;min-width:168px}.ecabs-button-toggle--large .mat-button-toggle .mat-button-toggle-label-content{font-size:16px;padding:0 28px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i2$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
302
302
|
}
|
|
303
303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsButtonToggleComponent, decorators: [{
|
|
304
304
|
type: Component,
|
|
@@ -308,7 +308,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
308
308
|
useExisting: forwardRef(() => EcabsButtonToggleComponent),
|
|
309
309
|
multi: true,
|
|
310
310
|
},
|
|
311
|
-
], template: "<mat-button-toggle-group\r\n class=\"ecabs-button-toggle\"\r\n [ngClass]=\"'ecabs-button-toggle--' + size\"\r\n [multiple]=\"multiple\"\r\n [value]=\"value\" \r\n [disabled]=\"isDisabled\"\r\n (change)=\"onGroupChange($event)\"\r\n> \r\n <mat-button-toggle\r\n *ngFor=\"let option of options; trackBy: trackByOptionValue\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.disabled\">\r\n {{ option.label }}\r\n </mat-button-toggle>\r\n</mat-button-toggle-group>", styles: [".ecabs-button-toggle{border-radius
|
|
311
|
+
], template: "<mat-button-toggle-group\r\n class=\"ecabs-button-toggle\"\r\n [ngClass]=\"'ecabs-button-toggle--' + size\"\r\n [multiple]=\"multiple\"\r\n [value]=\"value\" \r\n [disabled]=\"isDisabled\"\r\n (change)=\"onGroupChange($event)\"\r\n> \r\n <mat-button-toggle\r\n *ngFor=\"let option of options; trackBy: trackByOptionValue\"\r\n [value]=\"option.value\"\r\n [disabled]=\"option.disabled\">\r\n {{ option.label }}\r\n </mat-button-toggle>\r\n</mat-button-toggle-group>", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-button-toggle{border-radius:.5rem;box-shadow:none;border:none;background-color:var(--color-gray-100);padding:6px;display:inline-flex;align-items:center}.ecabs-button-toggle.mat-button-toggle-group-appearance-standard{border:none}.ecabs-button-toggle .mat-button-toggle{border:none!important;background:transparent;color:var(--color-gray-500);border-radius:.5rem;transition:background-color .2s ease,color .2s ease}.ecabs-button-toggle .mat-button-toggle:hover{background-color:var(--color-gray-100)}.ecabs-button-toggle .mat-button-toggle+.mat-button-toggle{border-left:none}.ecabs-button-toggle .mat-button-toggle-checked{color:var(--color-gray-900)}.ecabs-button-toggle .mat-button-toggle-checked .mat-button-toggle-button{background-color:var(--color-white);border-color:var(--color-gray-200);box-shadow:0 1px 2px #0000000f}.ecabs-button-toggle .mat-button-toggle-checked .mat-button-toggle-label-content{color:var(--color-gray-900)}.ecabs-button-toggle .mat-button-toggle-disabled{color:var(--color-gray-400)}.ecabs-button-toggle .mat-button-toggle-disabled .mat-button-toggle-button{cursor:not-allowed;opacity:.6}.ecabs-button-toggle .mat-button-toggle-button{border-radius:.5rem;border:1px solid transparent;display:flex;align-items:center;justify-content:center}.ecabs-button-toggle .mat-button-toggle-label-content{font-weight:500;font-family:inherit;line-height:1;display:inline-flex;align-items:center;justify-content:center}.ecabs-button-toggle--small .mat-button-toggle{height:32px}.ecabs-button-toggle--small .mat-button-toggle .mat-button-toggle-button{height:32px;min-width:72px}.ecabs-button-toggle--small .mat-button-toggle .mat-button-toggle-label-content{font-size:12px;padding:0 12px}.ecabs-button-toggle--medium .mat-button-toggle{height:40px}.ecabs-button-toggle--medium .mat-button-toggle .mat-button-toggle-button{height:40px;min-width:120px}.ecabs-button-toggle--medium .mat-button-toggle .mat-button-toggle-label-content{font-size:14px;padding:0 20px}.ecabs-button-toggle--large .mat-button-toggle{height:48px}.ecabs-button-toggle--large .mat-button-toggle .mat-button-toggle-button{height:48px;min-width:168px}.ecabs-button-toggle--large .mat-button-toggle .mat-button-toggle-label-content{font-size:16px;padding:0 28px}\n"] }]
|
|
312
312
|
}], ctorParameters: function () { return []; }, propDecorators: { options: [{
|
|
313
313
|
type: Input
|
|
314
314
|
}], multiple: [{
|
|
@@ -589,6 +589,18 @@ const errorMessages = [
|
|
|
589
589
|
type: 'dateFromMoreThanDateTo',
|
|
590
590
|
message: 'FORMS.VALIDATION.DATE_FROM_MORE_THAN_DATE_TO',
|
|
591
591
|
},
|
|
592
|
+
{
|
|
593
|
+
type: 'timeFromRangeRequired',
|
|
594
|
+
message: 'FORMS.VALIDATION.TIME_FROM_RANGE_REQUIRED',
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
type: 'timeToRangeRequired',
|
|
598
|
+
message: 'FORMS.VALIDATION.TIME_TO_RANGE_REQUIRED',
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
type: 'timeFromMoreThanDateTo',
|
|
602
|
+
message: 'FORMS.VALIDATION.TIME_FROM_MORE_THAN_TIME_TO',
|
|
603
|
+
},
|
|
592
604
|
];
|
|
593
605
|
|
|
594
606
|
const i18n = {
|
|
@@ -1274,6 +1286,216 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1274
1286
|
}]
|
|
1275
1287
|
}] });
|
|
1276
1288
|
|
|
1289
|
+
class EcabsInputRangeComponent extends EcabsElementBaseComponent {
|
|
1290
|
+
injector;
|
|
1291
|
+
destroyRef;
|
|
1292
|
+
toInput;
|
|
1293
|
+
digitsOnly;
|
|
1294
|
+
allowDecimal;
|
|
1295
|
+
allowHyphen;
|
|
1296
|
+
min;
|
|
1297
|
+
max;
|
|
1298
|
+
step;
|
|
1299
|
+
separatorText = 'to';
|
|
1300
|
+
fromPlaceholder = '0';
|
|
1301
|
+
toPlaceholder = 'Any';
|
|
1302
|
+
rangeChange = new EventEmitter();
|
|
1303
|
+
val = { from: null, to: null };
|
|
1304
|
+
isFocused = false;
|
|
1305
|
+
constructor(injector, destroyRef) {
|
|
1306
|
+
super();
|
|
1307
|
+
this.injector = injector;
|
|
1308
|
+
this.destroyRef = destroyRef;
|
|
1309
|
+
}
|
|
1310
|
+
ngAfterViewInit() {
|
|
1311
|
+
const ngControl = this.injector.get(NgControl, null);
|
|
1312
|
+
if (ngControl) {
|
|
1313
|
+
this.control = ngControl.control;
|
|
1314
|
+
this.control.statusChanges
|
|
1315
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
1316
|
+
.subscribe(() => {
|
|
1317
|
+
this.updateDisabledState();
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
this.updateDisabledState();
|
|
1321
|
+
}
|
|
1322
|
+
get value() {
|
|
1323
|
+
return this.val;
|
|
1324
|
+
}
|
|
1325
|
+
set value(v) {
|
|
1326
|
+
if (v !== this.val) {
|
|
1327
|
+
this.val = v;
|
|
1328
|
+
this.onChange(v);
|
|
1329
|
+
this.rangeChange.emit(v);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
setFocus(focus) {
|
|
1333
|
+
this.isFocused = focus;
|
|
1334
|
+
}
|
|
1335
|
+
focusToInput() {
|
|
1336
|
+
this.toInput.nativeElement.focus();
|
|
1337
|
+
}
|
|
1338
|
+
updateValue(key, val) {
|
|
1339
|
+
const num = val === '' || val === null ? null : Number(val);
|
|
1340
|
+
this.value = { ...this.value, [key]: num };
|
|
1341
|
+
this.onTouched();
|
|
1342
|
+
}
|
|
1343
|
+
getFromError(value = this.val) {
|
|
1344
|
+
if (value.from === null) {
|
|
1345
|
+
return null;
|
|
1346
|
+
}
|
|
1347
|
+
const errors = {};
|
|
1348
|
+
if (this.min !== undefined && value.from < this.min) {
|
|
1349
|
+
errors['min'] = { min: this.min, actual: value.from };
|
|
1350
|
+
}
|
|
1351
|
+
if (this.max !== undefined && value.from > this.max) {
|
|
1352
|
+
errors['max'] = { max: this.max, actual: value.from };
|
|
1353
|
+
}
|
|
1354
|
+
return Object.keys(errors).length > 0 ? errors : null;
|
|
1355
|
+
}
|
|
1356
|
+
getToError(value = this.val) {
|
|
1357
|
+
if (value.to === null) {
|
|
1358
|
+
return null;
|
|
1359
|
+
}
|
|
1360
|
+
const errors = {};
|
|
1361
|
+
const effectiveMin = value.from !== null ? value.from : this.min;
|
|
1362
|
+
if (effectiveMin !== undefined && value.to < effectiveMin) {
|
|
1363
|
+
errors['rangeOrder'] = { min: effectiveMin, max: value.to };
|
|
1364
|
+
}
|
|
1365
|
+
if (this.max !== undefined && value.to > this.max) {
|
|
1366
|
+
errors['max'] = { max: this.max, actual: value.to };
|
|
1367
|
+
}
|
|
1368
|
+
return Object.keys(errors).length > 0 ? errors : null;
|
|
1369
|
+
}
|
|
1370
|
+
getIncompleteRangeError(value = this.val) {
|
|
1371
|
+
if (this.min === undefined || this.max === undefined) {
|
|
1372
|
+
return null;
|
|
1373
|
+
}
|
|
1374
|
+
const hasFrom = value.from !== null;
|
|
1375
|
+
const hasTo = value.to !== null;
|
|
1376
|
+
if ((hasFrom && !hasTo) || (!hasFrom && hasTo)) {
|
|
1377
|
+
return { incompleteRange: true };
|
|
1378
|
+
}
|
|
1379
|
+
return null;
|
|
1380
|
+
}
|
|
1381
|
+
get hasAnyError() {
|
|
1382
|
+
return !!(this.control &&
|
|
1383
|
+
this.showValidation &&
|
|
1384
|
+
(this.control.touched ||
|
|
1385
|
+
this.control.dirty ||
|
|
1386
|
+
this.showValidationOnNotTouched) &&
|
|
1387
|
+
this.control.invalid);
|
|
1388
|
+
}
|
|
1389
|
+
validate(control) {
|
|
1390
|
+
const v = control.value;
|
|
1391
|
+
const isEmpty = !v || (v.from === null && v.to === null);
|
|
1392
|
+
if (isEmpty) {
|
|
1393
|
+
const requiredValidator = control.validator?.({});
|
|
1394
|
+
return requiredValidator?.['required'] ? { required: true } : null;
|
|
1395
|
+
}
|
|
1396
|
+
const fromErrors = this.getFromError(v);
|
|
1397
|
+
const toErrors = this.getToError(v);
|
|
1398
|
+
const incompleteRangeErrors = this.getIncompleteRangeError(v);
|
|
1399
|
+
if (!fromErrors && !toErrors && !incompleteRangeErrors) {
|
|
1400
|
+
return null;
|
|
1401
|
+
}
|
|
1402
|
+
return { ...fromErrors, ...toErrors, ...incompleteRangeErrors };
|
|
1403
|
+
}
|
|
1404
|
+
onChange = () => { };
|
|
1405
|
+
onTouched = () => { };
|
|
1406
|
+
writeValue(v) {
|
|
1407
|
+
this.val = v || { from: null, to: null };
|
|
1408
|
+
}
|
|
1409
|
+
registerOnChange(fn) {
|
|
1410
|
+
this.onChange = fn;
|
|
1411
|
+
}
|
|
1412
|
+
registerOnTouched(fn) {
|
|
1413
|
+
this.onTouched = fn;
|
|
1414
|
+
}
|
|
1415
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeComponent, deps: [{ token: i0.Injector }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1416
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsInputRangeComponent, selector: "ecabs-input-range", inputs: { digitsOnly: "digitsOnly", allowDecimal: "allowDecimal", allowHyphen: "allowHyphen", min: "min", max: "max", step: "step", separatorText: "separatorText", fromPlaceholder: "fromPlaceholder", toPlaceholder: "toPlaceholder" }, outputs: { rangeChange: "rangeChange" }, providers: [
|
|
1417
|
+
{
|
|
1418
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1419
|
+
useExisting: EcabsInputRangeComponent,
|
|
1420
|
+
multi: true,
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
provide: NG_VALIDATORS,
|
|
1424
|
+
useExisting: EcabsInputRangeComponent,
|
|
1425
|
+
multi: true,
|
|
1426
|
+
},
|
|
1427
|
+
], viewQueries: [{ propertyName: "toInput", first: true, predicate: ["toInput"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"bg-gray-100 rounded-xl p-4 flex flex-col gap-4\">\r\n <div\r\n class=\"form-field__range--wrapper\"\r\n [class.form-field--invalid]=\"hasAnyError\"\r\n >\r\n <input\r\n #fromInput\r\n ecabsDigitsOnly\r\n [digitsOnly]=\"digitsOnly\"\r\n [decimal]=\"allowDecimal\"\r\n [allowHyphen]=\"allowHyphen\"\r\n class=\"form-field__input text-center border-0 outline-none bg-transparent\"\r\n type=\"number\"\r\n [id]=\"name + '-from'\"\r\n [mini]=\"min\"\r\n [maxi]=\"max\"\r\n [step]=\"step\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"fromPlaceholder\"\r\n [ngModel]=\"value.from\"\r\n (ngModelChange)=\"updateValue('from', $event)\"\r\n (focus)=\"setFocus(true)\"\r\n (blur)=\"setFocus(false)\"\r\n (keydown.enter)=\"focusToInput()\"\r\n />\r\n <span class=\"text-gray-500 text-base mx-4\">{{separatorText}}</span>\r\n <input\r\n #toInput\r\n ecabsDigitsOnly\r\n [digitsOnly]=\"digitsOnly\"\r\n [decimal]=\"allowDecimal\"\r\n [allowHyphen]=\"allowHyphen\"\r\n class=\"form-field__input text-center border-0 outline-none bg-transparent\"\r\n type=\"number\"\r\n [id]=\"name + '-to'\"\r\n [mini]=\"value.from !== null ? value.from : min\"\r\n [maxi]=\"max\"\r\n [step]=\"step\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"toPlaceholder\"\r\n [ngModel]=\"value.to\"\r\n (ngModelChange)=\"updateValue('to', $event)\"\r\n (focus)=\"setFocus(true)\"\r\n (blur)=\"setFocus(false)\"\r\n />\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>", styles: [""], dependencies: [{ kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "directive", type: EcabsDigitsOnlyDirective, selector: "[ecabsDigitsOnly]", inputs: ["digitsOnly", "allowHyphen", "decimal", "decimalSeparator", "unit"] }, { kind: "directive", type: EcabsMinDirective, selector: "[mini][formControlName],[mini][formControl],[mini][ngModel]", inputs: ["mini"] }, { kind: "directive", type: EcabsMaxDirective, selector: "[maxi][formControlName],[maxi][formControl],[maxi][ngModel]", inputs: ["maxi"] }] });
|
|
1428
|
+
}
|
|
1429
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeComponent, decorators: [{
|
|
1430
|
+
type: Component,
|
|
1431
|
+
args: [{ selector: 'ecabs-input-range', providers: [
|
|
1432
|
+
{
|
|
1433
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1434
|
+
useExisting: EcabsInputRangeComponent,
|
|
1435
|
+
multi: true,
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
provide: NG_VALIDATORS,
|
|
1439
|
+
useExisting: EcabsInputRangeComponent,
|
|
1440
|
+
multi: true,
|
|
1441
|
+
},
|
|
1442
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"bg-gray-100 rounded-xl p-4 flex flex-col gap-4\">\r\n <div\r\n class=\"form-field__range--wrapper\"\r\n [class.form-field--invalid]=\"hasAnyError\"\r\n >\r\n <input\r\n #fromInput\r\n ecabsDigitsOnly\r\n [digitsOnly]=\"digitsOnly\"\r\n [decimal]=\"allowDecimal\"\r\n [allowHyphen]=\"allowHyphen\"\r\n class=\"form-field__input text-center border-0 outline-none bg-transparent\"\r\n type=\"number\"\r\n [id]=\"name + '-from'\"\r\n [mini]=\"min\"\r\n [maxi]=\"max\"\r\n [step]=\"step\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"fromPlaceholder\"\r\n [ngModel]=\"value.from\"\r\n (ngModelChange)=\"updateValue('from', $event)\"\r\n (focus)=\"setFocus(true)\"\r\n (blur)=\"setFocus(false)\"\r\n (keydown.enter)=\"focusToInput()\"\r\n />\r\n <span class=\"text-gray-500 text-base mx-4\">{{separatorText}}</span>\r\n <input\r\n #toInput\r\n ecabsDigitsOnly\r\n [digitsOnly]=\"digitsOnly\"\r\n [decimal]=\"allowDecimal\"\r\n [allowHyphen]=\"allowHyphen\"\r\n class=\"form-field__input text-center border-0 outline-none bg-transparent\"\r\n type=\"number\"\r\n [id]=\"name + '-to'\"\r\n [mini]=\"value.from !== null ? value.from : min\"\r\n [maxi]=\"max\"\r\n [step]=\"step\"\r\n [disabled]=\"disabled\"\r\n [placeholder]=\"toPlaceholder\"\r\n [ngModel]=\"value.to\"\r\n (ngModelChange)=\"updateValue('to', $event)\"\r\n (focus)=\"setFocus(true)\"\r\n (blur)=\"setFocus(false)\"\r\n />\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>" }]
|
|
1443
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.DestroyRef }]; }, propDecorators: { toInput: [{
|
|
1444
|
+
type: ViewChild,
|
|
1445
|
+
args: ['toInput']
|
|
1446
|
+
}], digitsOnly: [{
|
|
1447
|
+
type: Input
|
|
1448
|
+
}], allowDecimal: [{
|
|
1449
|
+
type: Input
|
|
1450
|
+
}], allowHyphen: [{
|
|
1451
|
+
type: Input
|
|
1452
|
+
}], min: [{
|
|
1453
|
+
type: Input
|
|
1454
|
+
}], max: [{
|
|
1455
|
+
type: Input
|
|
1456
|
+
}], step: [{
|
|
1457
|
+
type: Input
|
|
1458
|
+
}], separatorText: [{
|
|
1459
|
+
type: Input
|
|
1460
|
+
}], fromPlaceholder: [{
|
|
1461
|
+
type: Input
|
|
1462
|
+
}], toPlaceholder: [{
|
|
1463
|
+
type: Input
|
|
1464
|
+
}], rangeChange: [{
|
|
1465
|
+
type: Output
|
|
1466
|
+
}] } });
|
|
1467
|
+
|
|
1468
|
+
class EcabsInputRangeModule {
|
|
1469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1470
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeModule, declarations: [EcabsInputRangeComponent], imports: [CommonModule,
|
|
1471
|
+
FormsModule,
|
|
1472
|
+
ElementWrapperModule,
|
|
1473
|
+
EcabsDigitsOnlyDirectivesModule,
|
|
1474
|
+
EcabsMinMaxDirectiveModule,
|
|
1475
|
+
EcabsButtonsV2Module], exports: [EcabsInputRangeComponent] });
|
|
1476
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeModule, imports: [CommonModule,
|
|
1477
|
+
FormsModule,
|
|
1478
|
+
ElementWrapperModule,
|
|
1479
|
+
EcabsDigitsOnlyDirectivesModule,
|
|
1480
|
+
EcabsMinMaxDirectiveModule,
|
|
1481
|
+
EcabsButtonsV2Module] });
|
|
1482
|
+
}
|
|
1483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsInputRangeModule, decorators: [{
|
|
1484
|
+
type: NgModule,
|
|
1485
|
+
args: [{
|
|
1486
|
+
declarations: [EcabsInputRangeComponent],
|
|
1487
|
+
imports: [
|
|
1488
|
+
CommonModule,
|
|
1489
|
+
FormsModule,
|
|
1490
|
+
ElementWrapperModule,
|
|
1491
|
+
EcabsDigitsOnlyDirectivesModule,
|
|
1492
|
+
EcabsMinMaxDirectiveModule,
|
|
1493
|
+
EcabsButtonsV2Module
|
|
1494
|
+
],
|
|
1495
|
+
exports: [EcabsInputRangeComponent],
|
|
1496
|
+
}]
|
|
1497
|
+
}] });
|
|
1498
|
+
|
|
1277
1499
|
class EcabsTooltipIfTruncatedDirective {
|
|
1278
1500
|
matTooltip;
|
|
1279
1501
|
elementRef;
|
|
@@ -2203,6 +2425,118 @@ const WAYPOINT_SUGGESTIONS2 = [
|
|
|
2203
2425
|
},
|
|
2204
2426
|
];
|
|
2205
2427
|
|
|
2428
|
+
class EcabsCheckboxV2Component extends EcabsElementBaseComponent {
|
|
2429
|
+
injector;
|
|
2430
|
+
destroyRef;
|
|
2431
|
+
label = '';
|
|
2432
|
+
showLabel = false;
|
|
2433
|
+
checkboxChanged = new EventEmitter();
|
|
2434
|
+
val = false;
|
|
2435
|
+
get value() {
|
|
2436
|
+
return this.val;
|
|
2437
|
+
}
|
|
2438
|
+
get hasError() {
|
|
2439
|
+
return (!!this.control &&
|
|
2440
|
+
this.control.invalid &&
|
|
2441
|
+
(this.control.touched || this.control.dirty));
|
|
2442
|
+
}
|
|
2443
|
+
set value(value) {
|
|
2444
|
+
if (value !== undefined && this.val !== value) {
|
|
2445
|
+
this.val = value;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
constructor(injector, destroyRef) {
|
|
2449
|
+
super();
|
|
2450
|
+
this.injector = injector;
|
|
2451
|
+
this.destroyRef = destroyRef;
|
|
2452
|
+
}
|
|
2453
|
+
onChange = () => { };
|
|
2454
|
+
onTouched = () => { };
|
|
2455
|
+
ngAfterViewInit() {
|
|
2456
|
+
const ngControl = this.injector.get(NgControl, null);
|
|
2457
|
+
if (ngControl) {
|
|
2458
|
+
this.control = ngControl.control;
|
|
2459
|
+
this.validationLabel = this.label || this.validationLabel;
|
|
2460
|
+
this.control.statusChanges
|
|
2461
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2462
|
+
.subscribe(() => {
|
|
2463
|
+
this.updateDisabledState();
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
this.updateDisabledState();
|
|
2467
|
+
}
|
|
2468
|
+
toggle(event) {
|
|
2469
|
+
this.value = !!event.checked;
|
|
2470
|
+
this.onChange(this.value);
|
|
2471
|
+
this.onTouched();
|
|
2472
|
+
this.checkboxChanged.emit(this.value);
|
|
2473
|
+
}
|
|
2474
|
+
onRowClick() {
|
|
2475
|
+
if (!this.disabled) {
|
|
2476
|
+
this.value = !this.value;
|
|
2477
|
+
this.onChange(this.value);
|
|
2478
|
+
this.onTouched();
|
|
2479
|
+
this.checkboxChanged.emit(this.value);
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
onKeyDown(event) {
|
|
2483
|
+
if (event.key === ' ' || event.key === 'Enter') {
|
|
2484
|
+
event.preventDefault();
|
|
2485
|
+
this.onRowClick();
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
onBlur() {
|
|
2489
|
+
this.onTouched();
|
|
2490
|
+
}
|
|
2491
|
+
writeValue(value) {
|
|
2492
|
+
this.value = !!value;
|
|
2493
|
+
}
|
|
2494
|
+
registerOnChange(fn) {
|
|
2495
|
+
this.onChange = fn;
|
|
2496
|
+
}
|
|
2497
|
+
registerOnTouched(fn) {
|
|
2498
|
+
this.onTouched = fn;
|
|
2499
|
+
}
|
|
2500
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Component, deps: [{ token: i0.Injector }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2501
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsCheckboxV2Component, selector: "ecabs-checkbox-v2", inputs: { label: "label", showLabel: "showLabel" }, outputs: { checkboxChanged: "checkboxChanged" }, providers: [
|
|
2502
|
+
{
|
|
2503
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2504
|
+
useExisting: forwardRef(() => EcabsCheckboxV2Component),
|
|
2505
|
+
multi: true,
|
|
2506
|
+
},
|
|
2507
|
+
], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div\r\n class=\"ecabs-checkbox-v2\"\r\n [class.ecabs-checkbox-v2--checked]=\"value\"\r\n [class.ecabs-checkbox-v2--disabled]=\"disabled\"\r\n [class.ecabs-checkbox-v2--error]=\"hasError\"\r\n [attr.tabindex]=\"disabled ? null : 0\"\r\n (click)=\"onRowClick()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n >\r\n <span class=\"form-field__label text-base pl-2\">{{ label }}</span>\r\n\r\n <mat-checkbox\r\n class=\"ecabs-checkbox-v2__control\"\r\n [id]=\"name\"\r\n [name]=\"name\"\r\n [disabled]=\"disabled\"\r\n [checked]=\"value\"\r\n color=\"primary\"\r\n [disableRipple]=\"true\"\r\n (change)=\"toggle($event)\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n </mat-checkbox>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-checkbox-v2{display:flex;align-items:center;justify-content:space-between;width:100%;padding:4px 8px;border:1px solid var(--color-gray-200);border-radius:.5rem;background-color:var(--color-white);cursor:pointer}.ecabs-checkbox-v2:hover{border-color:var(--color-gray-300);background-color:var(--color-gray-50)}.ecabs-checkbox-v2--checked{border-color:var(--color-brand-dark)}.ecabs-checkbox-v2--error{border-color:var(--color-error)}.ecabs-checkbox-v2--error:hover{border-color:var(--color-error);background-color:var(--color-white)}.ecabs-checkbox-v2--disabled{opacity:.5;cursor:default;border-color:var(--color-gray-200);background-color:var(--color-white)}.ecabs-checkbox-v2--disabled:hover{border-color:var(--color-gray-200);background-color:var(--color-white)}\n"], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] });
|
|
2508
|
+
}
|
|
2509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Component, decorators: [{
|
|
2510
|
+
type: Component,
|
|
2511
|
+
args: [{ selector: 'ecabs-checkbox-v2', providers: [
|
|
2512
|
+
{
|
|
2513
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2514
|
+
useExisting: forwardRef(() => EcabsCheckboxV2Component),
|
|
2515
|
+
multi: true,
|
|
2516
|
+
},
|
|
2517
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div\r\n class=\"ecabs-checkbox-v2\"\r\n [class.ecabs-checkbox-v2--checked]=\"value\"\r\n [class.ecabs-checkbox-v2--disabled]=\"disabled\"\r\n [class.ecabs-checkbox-v2--error]=\"hasError\"\r\n [attr.tabindex]=\"disabled ? null : 0\"\r\n (click)=\"onRowClick()\"\r\n (keydown)=\"onKeyDown($event)\"\r\n >\r\n <span class=\"form-field__label text-base pl-2\">{{ label }}</span>\r\n\r\n <mat-checkbox\r\n class=\"ecabs-checkbox-v2__control\"\r\n [id]=\"name\"\r\n [name]=\"name\"\r\n [disabled]=\"disabled\"\r\n [checked]=\"value\"\r\n color=\"primary\"\r\n [disableRipple]=\"true\"\r\n (change)=\"toggle($event)\"\r\n (blur)=\"onBlur()\"\r\n (click)=\"$event.stopPropagation()\"\r\n >\r\n </mat-checkbox>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [":root{--color-black: #020618;--color-white: #ffffff;--color-white-opacity-05: rgba(0, 0, 0, .05);--color-gray-50: #F8FAFC;--color-gray-100: #F1F5F9;--color-gray-200: #E2E8F0;--color-gray-300: #CAD5E2;--color-gray-400: #90A1B9;--color-gray-500: #62748E;--color-gray-600: #45556C;--color-gray-700: #314158;--color-gray-800: #1D293D;--color-gray-900: #0F172B;--color-gray-950: #020618;--color-brand-dark: #193273;--color-brand-dark-rgb: 25, 50, 115;--color-brand-light: #325FDA;--color-brand-light2: #e7efff;--color-brand-light-rgb: 50, 95, 218;--color-brand-300: #e7efff;--color-brand-300-rgb: 231, 239, 255;--color-error: #df3838;--color-error-opacity: #fbe4e4;--color-error-rgb: 223, 56, 56;--color-notification: #f4d04f;--color-notification-rgb: 244, 208, 79;--color-warn: #f2994a;--color-warn-rgb: 242, 153, 74;--color-info: #325fda;--color-info-rgb: 50, 95, 218;--color-warning: #f2994a;--color-warning-opacity: #fdf0e4;--color-success: #075145;--color-success--opacity: #affebf;--color-success-rgb: 7, 81, 69;--color-allocation-started: #E8F8E5;--color-allocation-scheduled: #FDF0E4;--color-allocation-ended: #FBE4E4;--color-allocation-sick: #E7EFFF;--color-allocation-no-show: #EAE5FF;--color-allocation-unavailable: #F2F2F2;--cropper-outline-color: rgba(0, 0, 0, .5);--mat-option-label-text-color: var(--color-gray-900);--mat-option-focus-state-layer-color: var(--color-gray-100);--mat-option-hover-state-layer-color: var(--color-gray-50);--mat-option-label-text-size: 14px}.ecabs-checkbox-v2{display:flex;align-items:center;justify-content:space-between;width:100%;padding:4px 8px;border:1px solid var(--color-gray-200);border-radius:.5rem;background-color:var(--color-white);cursor:pointer}.ecabs-checkbox-v2:hover{border-color:var(--color-gray-300);background-color:var(--color-gray-50)}.ecabs-checkbox-v2--checked{border-color:var(--color-brand-dark)}.ecabs-checkbox-v2--error{border-color:var(--color-error)}.ecabs-checkbox-v2--error:hover{border-color:var(--color-error);background-color:var(--color-white)}.ecabs-checkbox-v2--disabled{opacity:.5;cursor:default;border-color:var(--color-gray-200);background-color:var(--color-white)}.ecabs-checkbox-v2--disabled:hover{border-color:var(--color-gray-200);background-color:var(--color-white)}\n"] }]
|
|
2518
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.DestroyRef }]; }, propDecorators: { label: [{
|
|
2519
|
+
type: Input
|
|
2520
|
+
}], showLabel: [{
|
|
2521
|
+
type: Input
|
|
2522
|
+
}], checkboxChanged: [{
|
|
2523
|
+
type: Output
|
|
2524
|
+
}] } });
|
|
2525
|
+
|
|
2526
|
+
class EcabsCheckboxV2Module {
|
|
2527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2528
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Module, declarations: [EcabsCheckboxV2Component], imports: [CommonModule, ElementWrapperModule, FormsModule, MatIconModule, MatCheckboxModule], exports: [EcabsCheckboxV2Component] });
|
|
2529
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Module, imports: [CommonModule, ElementWrapperModule, FormsModule, MatIconModule, MatCheckboxModule] });
|
|
2530
|
+
}
|
|
2531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsCheckboxV2Module, decorators: [{
|
|
2532
|
+
type: NgModule,
|
|
2533
|
+
args: [{
|
|
2534
|
+
declarations: [EcabsCheckboxV2Component],
|
|
2535
|
+
imports: [CommonModule, ElementWrapperModule, FormsModule, MatIconModule, MatCheckboxModule],
|
|
2536
|
+
exports: [EcabsCheckboxV2Component],
|
|
2537
|
+
}]
|
|
2538
|
+
}] });
|
|
2539
|
+
|
|
2206
2540
|
class UnsubscribeService {
|
|
2207
2541
|
issued = false;
|
|
2208
2542
|
unsubscribe$;
|
|
@@ -2585,168 +2919,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2585
2919
|
args: ['keyup', ['$event']]
|
|
2586
2920
|
}] } });
|
|
2587
2921
|
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
}
|
|
2607
|
-
const minValue = {
|
|
2608
|
-
dd: 1,
|
|
2609
|
-
mm: 1,
|
|
2610
|
-
yy: 0,
|
|
2611
|
-
yyyy: minYear,
|
|
2612
|
-
HH: 0,
|
|
2613
|
-
MM: 0,
|
|
2614
|
-
SS: 0,
|
|
2615
|
-
};
|
|
2616
|
-
const conformedValueArr = conformedValue.split('');
|
|
2617
|
-
// Check first digit
|
|
2618
|
-
dateFormatArray.forEach((format) => {
|
|
2619
|
-
const position = dateFormat.indexOf(format);
|
|
2620
|
-
const maxFirstDigit = parseInt(maxValue[format].toString().substr(0, 1), 10);
|
|
2621
|
-
if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {
|
|
2622
|
-
conformedValueArr[position + 1] = conformedValueArr[position];
|
|
2623
|
-
conformedValueArr[position] = 0;
|
|
2624
|
-
indexesOfPipedChars.push(position);
|
|
2625
|
-
}
|
|
2626
|
-
});
|
|
2627
|
-
// Check for invalid date
|
|
2628
|
-
let month = 0;
|
|
2629
|
-
const isInvalid = dateFormatArray.some((format) => {
|
|
2630
|
-
const position = dateFormat.indexOf(format);
|
|
2631
|
-
const length = format.length;
|
|
2632
|
-
const textValue = conformedValue
|
|
2633
|
-
.substr(position, length)
|
|
2634
|
-
.replace(/\D/g, '');
|
|
2635
|
-
const value = parseInt(textValue, 10);
|
|
2636
|
-
if (format === 'mm') {
|
|
2637
|
-
// tslint:disable-next-line: strict-boolean-expressions
|
|
2638
|
-
month = value || 0;
|
|
2639
|
-
}
|
|
2640
|
-
const maxValueForFormat = format === 'dd' ? maxValueMonth[month] : maxValue[format];
|
|
2641
|
-
if (format === 'yyyy' && (minYear !== 1 || maxYear !== 9999)) {
|
|
2642
|
-
const scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10);
|
|
2643
|
-
const scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10);
|
|
2644
|
-
return value < scopedMinValue || value > scopedMaxValue;
|
|
2645
|
-
}
|
|
2646
|
-
if (format === 'HH' || format === 'MM') {
|
|
2647
|
-
const scopedMaxValue = parseInt(maxValue[format].toString().substring(0, textValue.length), 10);
|
|
2648
|
-
const scopedMinValue = parseInt(minValue[format].toString().substring(0, textValue.length), 10);
|
|
2649
|
-
return value < scopedMinValue || value > scopedMaxValue;
|
|
2650
|
-
}
|
|
2651
|
-
return (value > maxValueForFormat ||
|
|
2652
|
-
(textValue.length === length && value < minValue[format]));
|
|
2653
|
-
});
|
|
2654
|
-
if (isInvalid) {
|
|
2655
|
-
return false;
|
|
2656
|
-
}
|
|
2657
|
-
return {
|
|
2658
|
-
value: conformedValueArr.join(''),
|
|
2659
|
-
indexesOfPipedChars,
|
|
2660
|
-
};
|
|
2922
|
+
function createTimeRangeMaskOptions() {
|
|
2923
|
+
return {
|
|
2924
|
+
mask: ({ value }) => {
|
|
2925
|
+
const [startValue = '', endValue = ''] = value.split('-');
|
|
2926
|
+
return [
|
|
2927
|
+
...buildTimeMask(startValue.trim()),
|
|
2928
|
+
' ',
|
|
2929
|
+
'-',
|
|
2930
|
+
' ',
|
|
2931
|
+
...buildTimeMask(endValue.trim()),
|
|
2932
|
+
];
|
|
2933
|
+
},
|
|
2934
|
+
};
|
|
2935
|
+
}
|
|
2936
|
+
function createTimeMaskOptions() {
|
|
2937
|
+
return {
|
|
2938
|
+
mask: ({ value }) => {
|
|
2939
|
+
return buildTimeMask(value);
|
|
2940
|
+
},
|
|
2661
2941
|
};
|
|
2942
|
+
}
|
|
2943
|
+
function buildTimeMask(value) {
|
|
2944
|
+
const { hoursDigits, minutesDigits } = extractDigits(value);
|
|
2945
|
+
const result = [];
|
|
2946
|
+
result.push(...getHourMask(hoursDigits));
|
|
2947
|
+
result.push(':');
|
|
2948
|
+
result.push(...getMinuteMask(minutesDigits));
|
|
2949
|
+
return result;
|
|
2950
|
+
}
|
|
2951
|
+
function extractDigits(value) {
|
|
2952
|
+
const [hoursPart = '', minutesPart = ''] = value.split(':');
|
|
2953
|
+
const hoursDigits = hoursPart.replace(/\D/g, '').slice(0, 2);
|
|
2954
|
+
const minutesDigitsFromPart = minutesPart.replace(/\D/g, '').slice(0, 2);
|
|
2955
|
+
if (minutesPart) {
|
|
2956
|
+
return { hoursDigits, minutesDigits: minutesDigitsFromPart };
|
|
2957
|
+
}
|
|
2958
|
+
const digits = value.replace(/\D/g, '');
|
|
2959
|
+
const inferredHours = digits.slice(0, 2);
|
|
2960
|
+
const inferredMinutes = digits.slice(2, 4);
|
|
2961
|
+
return {
|
|
2962
|
+
hoursDigits: hoursDigits || inferredHours,
|
|
2963
|
+
minutesDigits: minutesDigitsFromPart || inferredMinutes,
|
|
2964
|
+
};
|
|
2965
|
+
}
|
|
2966
|
+
function getHourMask(hoursDigits) {
|
|
2967
|
+
if (hoursDigits.length >= 2) {
|
|
2968
|
+
return get24HourMaskStrict(hoursDigits);
|
|
2969
|
+
}
|
|
2970
|
+
if (!hoursDigits.length) {
|
|
2971
|
+
return [/\d/, /\d?/];
|
|
2972
|
+
}
|
|
2973
|
+
if (hoursDigits.length === 1) {
|
|
2974
|
+
const [h1] = hoursDigits;
|
|
2975
|
+
if (h1 === '0' || h1 === '1') {
|
|
2976
|
+
return [/[0-1]/, /\d?/];
|
|
2977
|
+
}
|
|
2978
|
+
if (h1 === '2') {
|
|
2979
|
+
return [/2/, /[0-3]?/];
|
|
2980
|
+
}
|
|
2981
|
+
return ['0', /[3-9]/];
|
|
2982
|
+
}
|
|
2983
|
+
return [/[0-9]/, /\d?/];
|
|
2984
|
+
}
|
|
2985
|
+
function get24HourMaskStrict(hoursDigits) {
|
|
2986
|
+
const [h1] = hoursDigits;
|
|
2987
|
+
if (h1 === '2') {
|
|
2988
|
+
return [/2/, /[0-3]/];
|
|
2989
|
+
}
|
|
2990
|
+
if (h1 === '0' || h1 === '1') {
|
|
2991
|
+
return [/[0-1]/, /\d/];
|
|
2992
|
+
}
|
|
2993
|
+
return [/[0-2]/, /[0-3]/];
|
|
2994
|
+
}
|
|
2995
|
+
function getMinuteMask(minutesDigits) {
|
|
2996
|
+
if (minutesDigits.length >= 2) {
|
|
2997
|
+
return [/[0-5]/, /\d/];
|
|
2998
|
+
}
|
|
2999
|
+
if (minutesDigits.length === 1) {
|
|
3000
|
+
const firstDigit = parseInt(minutesDigits[0], 10);
|
|
3001
|
+
if (firstDigit > 5) {
|
|
3002
|
+
return ['0', /[6-9]/];
|
|
3003
|
+
}
|
|
3004
|
+
return [/[0-5]/, /\d?/];
|
|
3005
|
+
}
|
|
3006
|
+
return [/[0-9]/, /\d?/];
|
|
2662
3007
|
}
|
|
2663
3008
|
|
|
2664
3009
|
class EcabsMaskDateDirective {
|
|
2665
3010
|
element;
|
|
2666
3011
|
isDateTimeMask = false;
|
|
2667
3012
|
considerSeconds = false;
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
maskDateTime = [
|
|
2671
|
-
/\d/,
|
|
2672
|
-
/\d/,
|
|
2673
|
-
'/',
|
|
2674
|
-
/\d/,
|
|
2675
|
-
/\d/,
|
|
2676
|
-
'/',
|
|
2677
|
-
/\d/,
|
|
2678
|
-
/\d/,
|
|
2679
|
-
/\d/,
|
|
2680
|
-
/\d/,
|
|
2681
|
-
',',
|
|
2682
|
-
' ',
|
|
2683
|
-
/\d/,
|
|
2684
|
-
/\d/,
|
|
2685
|
-
':',
|
|
2686
|
-
/\d/,
|
|
2687
|
-
/\d/,
|
|
2688
|
-
]; // dd/mm/yyyy, hh:mm
|
|
2689
|
-
maskDateTimeWithSeconds = [
|
|
2690
|
-
/\d/,
|
|
2691
|
-
/\d/,
|
|
2692
|
-
'/',
|
|
2693
|
-
/\d/,
|
|
2694
|
-
/\d/,
|
|
2695
|
-
'/',
|
|
2696
|
-
/\d/,
|
|
2697
|
-
/\d/,
|
|
2698
|
-
/\d/,
|
|
2699
|
-
/\d/,
|
|
2700
|
-
',',
|
|
2701
|
-
' ',
|
|
2702
|
-
/\d/,
|
|
2703
|
-
/\d/,
|
|
2704
|
-
':',
|
|
2705
|
-
/\d/,
|
|
2706
|
-
/\d/,
|
|
2707
|
-
':',
|
|
2708
|
-
/\d/,
|
|
2709
|
-
/\d/,
|
|
2710
|
-
]; // dd/mm/yyyy, hh:mm:ss
|
|
2711
|
-
config;
|
|
3013
|
+
maskedInput = null;
|
|
3014
|
+
timeMaskOptions = createTimeMaskOptions();
|
|
2712
3015
|
constructor(element) {
|
|
2713
3016
|
this.element = element;
|
|
2714
3017
|
}
|
|
2715
|
-
onNgModelChange(value) {
|
|
2716
|
-
this.config.showMask = true;
|
|
2717
|
-
if (!this.containsNumber(value.toString())) {
|
|
2718
|
-
this.config.showMask = false;
|
|
2719
|
-
this.maskedInputController.textMaskInputElement.update('');
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
3018
|
ngOnInit() {
|
|
2723
|
-
this.
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
showMask: true,
|
|
2727
|
-
pipe: this.isDateTimeMask
|
|
2728
|
-
? this.considerSeconds
|
|
2729
|
-
? createAutoCorrectedDatePipe('dd/mm/yyyy, HH:MM:SS')
|
|
2730
|
-
: createAutoCorrectedDatePipe('dd/mm/yyyy, HH:MM')
|
|
2731
|
-
: createAutoCorrectedDatePipe('dd/mm/yyyy'),
|
|
2732
|
-
keepCharPositions: true,
|
|
2733
|
-
mask: this.isDateTimeMask
|
|
2734
|
-
? this.considerSeconds
|
|
2735
|
-
? this.maskDateTimeWithSeconds
|
|
2736
|
-
: this.maskDateTime
|
|
2737
|
-
: this.mask,
|
|
2738
|
-
};
|
|
2739
|
-
this.maskedInputController = textMask.maskInput(this.config);
|
|
3019
|
+
this.maskedInput = new Maskito(this.element.nativeElement, {
|
|
3020
|
+
mask: ({ value }) => this.buildDynamicMask(value),
|
|
3021
|
+
});
|
|
2740
3022
|
}
|
|
2741
3023
|
ngOnDestroy() {
|
|
2742
|
-
this.
|
|
3024
|
+
this.maskedInput?.destroy();
|
|
3025
|
+
}
|
|
3026
|
+
buildDynamicMask(value) {
|
|
3027
|
+
const digits = value.replace(/\D/g, '');
|
|
3028
|
+
const result = [];
|
|
3029
|
+
result.push(...this.getDaySegment(digits));
|
|
3030
|
+
result.push('/');
|
|
3031
|
+
result.push(...this.getMonthSegment(digits));
|
|
3032
|
+
result.push('/');
|
|
3033
|
+
result.push(/\d/, /\d/, /\d/, /\d/);
|
|
3034
|
+
if (!this.isDateTimeMask) {
|
|
3035
|
+
return result;
|
|
3036
|
+
}
|
|
3037
|
+
const timeValue = this.extractTimeValue(value);
|
|
3038
|
+
const timeMaskOption = this.timeMaskOptions.mask;
|
|
3039
|
+
const timeMaskRaw = typeof timeMaskOption === 'function'
|
|
3040
|
+
? timeMaskOption({
|
|
3041
|
+
value: timeValue,
|
|
3042
|
+
selection: [timeValue.length, timeValue.length],
|
|
3043
|
+
})
|
|
3044
|
+
: timeMaskOption;
|
|
3045
|
+
const timeMask = Array.isArray(timeMaskRaw) ? timeMaskRaw : [timeMaskRaw];
|
|
3046
|
+
result.push(',', ' ');
|
|
3047
|
+
result.push(...timeMask);
|
|
3048
|
+
if (this.considerSeconds) {
|
|
3049
|
+
result.push(':');
|
|
3050
|
+
result.push(/[0-5]/, /\d/);
|
|
3051
|
+
}
|
|
3052
|
+
return result;
|
|
3053
|
+
}
|
|
3054
|
+
getDaySegment(digits) {
|
|
3055
|
+
const d1 = digits[0];
|
|
3056
|
+
if (d1 === '3') {
|
|
3057
|
+
return [/[0-3]/, /[0-1]/];
|
|
3058
|
+
}
|
|
3059
|
+
return [/[0-3]/, /\d/];
|
|
2743
3060
|
}
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
3061
|
+
getMonthSegment(digits) {
|
|
3062
|
+
const m1 = digits[2];
|
|
3063
|
+
if (m1 === '1') {
|
|
3064
|
+
return [/[0-1]/, /[0-2]/];
|
|
3065
|
+
}
|
|
3066
|
+
return [/[0-1]/, /\d/];
|
|
3067
|
+
}
|
|
3068
|
+
extractTimeValue(value) {
|
|
3069
|
+
const [, timePart = ''] = value.split(',');
|
|
3070
|
+
return timePart.trimStart();
|
|
2747
3071
|
}
|
|
2748
3072
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsMaskDateDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2749
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EcabsMaskDateDirective, selector: "[ecabsMaskDate]", inputs: { isDateTimeMask: "isDateTimeMask", considerSeconds: "considerSeconds" },
|
|
3073
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EcabsMaskDateDirective, selector: "[ecabsMaskDate]", inputs: { isDateTimeMask: "isDateTimeMask", considerSeconds: "considerSeconds" }, ngImport: i0 });
|
|
2750
3074
|
}
|
|
2751
3075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsMaskDateDirective, decorators: [{
|
|
2752
3076
|
type: Directive,
|
|
@@ -2757,9 +3081,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2757
3081
|
type: Input
|
|
2758
3082
|
}], considerSeconds: [{
|
|
2759
3083
|
type: Input
|
|
2760
|
-
}], onNgModelChange: [{
|
|
2761
|
-
type: HostListener,
|
|
2762
|
-
args: ['ngModelChange', ['$event']]
|
|
2763
3084
|
}] } });
|
|
2764
3085
|
|
|
2765
3086
|
class EcabsDateTimePickerComponent extends EcabsElementBaseComponent {
|
|
@@ -2793,7 +3114,7 @@ class EcabsDateTimePickerComponent extends EcabsElementBaseComponent {
|
|
|
2793
3114
|
preventCallSetterPickerValue = false;
|
|
2794
3115
|
runTimeout = false;
|
|
2795
3116
|
translationConfig;
|
|
2796
|
-
isEmptyFormat =
|
|
3117
|
+
isEmptyFormat = undefined;
|
|
2797
3118
|
get value() {
|
|
2798
3119
|
return this.val;
|
|
2799
3120
|
}
|
|
@@ -2810,19 +3131,22 @@ class EcabsDateTimePickerComponent extends EcabsElementBaseComponent {
|
|
|
2810
3131
|
return this._seconds;
|
|
2811
3132
|
}
|
|
2812
3133
|
set hours(value) {
|
|
2813
|
-
if (value
|
|
2814
|
-
|
|
3134
|
+
if (value === undefined || this._hours === value) {
|
|
3135
|
+
return;
|
|
2815
3136
|
}
|
|
3137
|
+
this._hours = this.normalizeWithAutoPad(value, 3);
|
|
2816
3138
|
}
|
|
2817
3139
|
set minutes(value) {
|
|
2818
|
-
if (value
|
|
2819
|
-
|
|
3140
|
+
if (value === undefined || this._minutes === value) {
|
|
3141
|
+
return;
|
|
2820
3142
|
}
|
|
3143
|
+
this._minutes = this.normalizeWithAutoPad(value, 6);
|
|
2821
3144
|
}
|
|
2822
3145
|
set seconds(value) {
|
|
2823
|
-
if (value
|
|
2824
|
-
|
|
3146
|
+
if (value === undefined || this._seconds === value) {
|
|
3147
|
+
return;
|
|
2825
3148
|
}
|
|
3149
|
+
this._seconds = this.normalizeWithAutoPad(value, 6);
|
|
2826
3150
|
}
|
|
2827
3151
|
set value(val) {
|
|
2828
3152
|
if (val && this.val?.getTime() !== new Date(val).getTime()) {
|
|
@@ -2928,7 +3252,24 @@ class EcabsDateTimePickerComponent extends EcabsElementBaseComponent {
|
|
|
2928
3252
|
}
|
|
2929
3253
|
return result;
|
|
2930
3254
|
}
|
|
2931
|
-
|
|
3255
|
+
normalizeWithAutoPad(rawValue, autoPadFrom) {
|
|
3256
|
+
const digits = this.toDigits(rawValue, 2);
|
|
3257
|
+
if (!digits) {
|
|
3258
|
+
return '';
|
|
3259
|
+
}
|
|
3260
|
+
if (digits.length === 1) {
|
|
3261
|
+
const first = parseInt(digits, 10);
|
|
3262
|
+
if (first >= autoPadFrom) {
|
|
3263
|
+
return this.formatTwoDigits(first);
|
|
3264
|
+
}
|
|
3265
|
+
return digits;
|
|
3266
|
+
}
|
|
3267
|
+
return this.formatTwoDigits(parseInt(digits, 10));
|
|
3268
|
+
}
|
|
3269
|
+
toDigits(value, maxLength) {
|
|
3270
|
+
return value?.toString().replace(/\D/g, '').slice(0, maxLength) ?? '';
|
|
3271
|
+
}
|
|
3272
|
+
formatTwoDigits(num) {
|
|
2932
3273
|
return this.decimalPipe.transform(num, '2.0-0') ?? '00';
|
|
2933
3274
|
}
|
|
2934
3275
|
setValues(date) {
|
|
@@ -2954,7 +3295,7 @@ class EcabsDateTimePickerComponent extends EcabsElementBaseComponent {
|
|
|
2954
3295
|
},
|
|
2955
3296
|
DecimalPipe,
|
|
2956
3297
|
UnsubscribeService,
|
|
2957
|
-
], viewQueries: [{ propertyName: "matCustomInput", first: true, predicate: ["matCustomInput"], descendants: true }, { propertyName: "matCustomPicker", first: true, predicate: ["picker"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"picker\"\r\n [min]=\"minDate\"\r\n [max]=\"maxDate\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker #picker [calendarHeaderComponent]=\"header\" [touchUi]=\"touchUi\" class=\"datepicker-ui\">\r\n <mat-datepicker-actions>\r\n <div class=\"actions\">\r\n <div class=\"time--inputs\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hours\"\r\n [value]=\"_hours\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hours\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutes\"\r\n [(ngModel)]=\"minutes\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n\r\n <ng-container *ngIf=\"!hideSeconds\">\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"seconds\"\r\n [(ngModel)]=\"seconds\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </ng-container>\r\n </div>\r\n\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input #matCustomInput\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n
|
|
3298
|
+
], viewQueries: [{ propertyName: "matCustomInput", first: true, predicate: ["matCustomInput"], descendants: true }, { propertyName: "matCustomPicker", first: true, predicate: ["picker"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"picker\"\r\n [min]=\"minDate\"\r\n [max]=\"maxDate\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker #picker [calendarHeaderComponent]=\"header\" [touchUi]=\"touchUi\" class=\"datepicker-ui\">\r\n <mat-datepicker-actions>\r\n <div class=\"actions\">\r\n <div class=\"time--inputs\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hours\"\r\n [value]=\"_hours\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hours\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutes\"\r\n [(ngModel)]=\"minutes\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n\r\n <ng-container *ngIf=\"!hideSeconds\">\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"seconds\"\r\n [(ngModel)]=\"seconds\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </ng-container>\r\n </div>\r\n\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input #matCustomInput\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n placeholder=\"dd/MM/yyyy, HH:mm\"\r\n [disabled]=\"disabled\"\r\n ecabsMaskDate\r\n [isDateTimeMask]=\"true\"\r\n [considerSeconds]=\"!hideSeconds\"\r\n (blur)=\"onTouch()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\r\n <mat-icon matDatepickerToggleIcon\r\n class=\"text-gray-500\">\r\n calendar_today\r\n </mat-icon>\r\n </mat-datepicker-toggle>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [".time--inputs:before,.time--inputs:after{position:absolute;content:\"\"}.time{width:3.375rem}.fake-input{visibility:hidden;width:0;padding:0;margin:0}.time--inputs{position:relative;display:flex;gap:.5rem;justify-content:center;align-items:center;margin-top:2.4rem;margin-bottom:2.4rem}.time--inputs:before,.time--inputs:after{height:1px;right:0;left:0;background-color:var(--color-gray-300)}.time--inputs:before{top:-1.6rem}.time--inputs:after{bottom:-1.6rem}.font-bold{font-weight:700}.actions{display:flex;flex-direction:column;width:100%!important;row-gap:1rem}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i6.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i6.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EcabsDigitsOnlyDirective, selector: "[ecabsDigitsOnly]", inputs: ["digitsOnly", "allowHyphen", "decimal", "decimalSeparator", "unit"] }, { kind: "directive", type: EcabsNumberBorderDirective, selector: "[ecabsNumberBorder]", inputs: ["maxValue", "minValue"] }, { kind: "directive", type: EcabsMaskDateDirective, selector: "[ecabsMaskDate]", inputs: ["isDateTimeMask", "considerSeconds"] }, { kind: "component", type: EcabsDatePickerActionsComponent, selector: "ecabs-date-picker-actions", inputs: ["cancelLabel", "applyLabel", "isDateRange", "disabledApplyButton"], outputs: ["apply"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }] });
|
|
2958
3299
|
}
|
|
2959
3300
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateTimePickerComponent, decorators: [{
|
|
2960
3301
|
type: Component,
|
|
@@ -2966,7 +3307,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2966
3307
|
},
|
|
2967
3308
|
DecimalPipe,
|
|
2968
3309
|
UnsubscribeService,
|
|
2969
|
-
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"picker\"\r\n [min]=\"minDate\"\r\n [max]=\"maxDate\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker #picker [calendarHeaderComponent]=\"header\" [touchUi]=\"touchUi\" class=\"datepicker-ui\">\r\n <mat-datepicker-actions>\r\n <div class=\"actions\">\r\n <div class=\"time--inputs\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hours\"\r\n [value]=\"_hours\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hours\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutes\"\r\n [(ngModel)]=\"minutes\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n\r\n <ng-container *ngIf=\"!hideSeconds\">\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"seconds\"\r\n [(ngModel)]=\"seconds\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </ng-container>\r\n </div>\r\n\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input #matCustomInput\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n
|
|
3310
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"picker\"\r\n [min]=\"minDate\"\r\n [max]=\"maxDate\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker #picker [calendarHeaderComponent]=\"header\" [touchUi]=\"touchUi\" class=\"datepicker-ui\">\r\n <mat-datepicker-actions>\r\n <div class=\"actions\">\r\n <div class=\"time--inputs\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hours\"\r\n [value]=\"_hours\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hours\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutes\"\r\n [(ngModel)]=\"minutes\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n\r\n <ng-container *ngIf=\"!hideSeconds\">\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"seconds\"\r\n [(ngModel)]=\"seconds\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </ng-container>\r\n </div>\r\n\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input #matCustomInput\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n placeholder=\"dd/MM/yyyy, HH:mm\"\r\n [disabled]=\"disabled\"\r\n ecabsMaskDate\r\n [isDateTimeMask]=\"true\"\r\n [considerSeconds]=\"!hideSeconds\"\r\n (blur)=\"onTouch()\"\r\n />\r\n\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\r\n <mat-icon matDatepickerToggleIcon\r\n class=\"text-gray-500\">\r\n calendar_today\r\n </mat-icon>\r\n </mat-datepicker-toggle>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [".time--inputs:before,.time--inputs:after{position:absolute;content:\"\"}.time{width:3.375rem}.fake-input{visibility:hidden;width:0;padding:0;margin:0}.time--inputs{position:relative;display:flex;gap:.5rem;justify-content:center;align-items:center;margin-top:2.4rem;margin-bottom:2.4rem}.time--inputs:before,.time--inputs:after{height:1px;right:0;left:0;background-color:var(--color-gray-300)}.time--inputs:before{top:-1.6rem}.time--inputs:after{bottom:-1.6rem}.font-bold{font-weight:700}.actions{display:flex;flex-direction:column;width:100%!important;row-gap:1rem}\n"] }]
|
|
2970
3311
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.DecimalPipe }, { type: i0.ChangeDetectorRef }, { type: EcabsDatePickerHeaderService }, { type: UnsubscribeService }]; }, propDecorators: { matCustomInput: [{
|
|
2971
3312
|
type: ViewChild,
|
|
2972
3313
|
args: ['matCustomInput', { static: false }]
|
|
@@ -3461,45 +3802,21 @@ class EcabsMaskTimeDirective {
|
|
|
3461
3802
|
element;
|
|
3462
3803
|
timeRange = false;
|
|
3463
3804
|
all;
|
|
3464
|
-
|
|
3465
|
-
maskTimeRange = [
|
|
3466
|
-
/\d/,
|
|
3467
|
-
/\d/,
|
|
3468
|
-
':',
|
|
3469
|
-
/\d/,
|
|
3470
|
-
/\d/,
|
|
3471
|
-
' ',
|
|
3472
|
-
'-',
|
|
3473
|
-
' ',
|
|
3474
|
-
/\d/,
|
|
3475
|
-
/\d/,
|
|
3476
|
-
':',
|
|
3477
|
-
/\d/,
|
|
3478
|
-
/\d/,
|
|
3479
|
-
];
|
|
3480
|
-
maskTime = [/\d/, /\d/, ':', /\d/, /\d/];
|
|
3805
|
+
maskedInput = null;
|
|
3481
3806
|
constructor(element) {
|
|
3482
3807
|
this.element = element;
|
|
3483
3808
|
}
|
|
3484
3809
|
ngOnInit() {
|
|
3485
|
-
const
|
|
3486
|
-
|
|
3487
|
-
this.maskedInputController = textMask.maskInput({
|
|
3488
|
-
inputElement: this.element.nativeElement,
|
|
3489
|
-
guide: true,
|
|
3490
|
-
showMask: false,
|
|
3491
|
-
keepCharPositions: true,
|
|
3492
|
-
mask: timeRange ? this.maskTimeRange : this.maskTime,
|
|
3493
|
-
pipe: function (conformedValue) {
|
|
3494
|
-
if (conformedValue === (timeRange ? '__:__ - __:__' : '__:__')) {
|
|
3495
|
-
return all;
|
|
3496
|
-
}
|
|
3497
|
-
return conformedValue;
|
|
3498
|
-
},
|
|
3499
|
-
});
|
|
3810
|
+
const options = this.getMaskOptions();
|
|
3811
|
+
this.maskedInput = new Maskito(this.element.nativeElement, options);
|
|
3500
3812
|
}
|
|
3501
3813
|
ngOnDestroy() {
|
|
3502
|
-
this.
|
|
3814
|
+
this.maskedInput?.destroy();
|
|
3815
|
+
}
|
|
3816
|
+
getMaskOptions() {
|
|
3817
|
+
return this.timeRange
|
|
3818
|
+
? createTimeRangeMaskOptions()
|
|
3819
|
+
: createTimeMaskOptions();
|
|
3503
3820
|
}
|
|
3504
3821
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsMaskTimeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3505
3822
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EcabsMaskTimeDirective, selector: "[ecabsTime]", inputs: { timeRange: "timeRange", all: "all" }, ngImport: i0 });
|
|
@@ -3717,7 +4034,7 @@ class EcabsDateTimeRangePickerComponent extends EcabsElementBaseComponent {
|
|
|
3717
4034
|
},
|
|
3718
4035
|
DecimalPipe,
|
|
3719
4036
|
UnsubscribeService,
|
|
3720
|
-
], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker\r\n (opened)=\"opened()\"\r\n #picker\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\"\r\n >\r\n <mat-datepicker-actions>\r\n <div class=\"flex flex-col w-full gap-y-4\">\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ from ?? translationConfig?.from }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"block form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursFrom\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursFrom\"\r\n />\r\n\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesFrom\"\r\n [(ngModel)]=\"minutesFrom\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"time--inputs\"></div>\r\n <div class=\"flex gap-2 justify-center items-center mb-5\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ to ?? translationConfig?.to }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursTo\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursTo\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesTo\"\r\n [(ngModel)]=\"minutesTo\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n
|
|
4037
|
+
], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker\r\n (opened)=\"opened()\"\r\n #picker\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\"\r\n >\r\n <mat-datepicker-actions>\r\n <div class=\"flex flex-col w-full gap-y-4\">\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ from ?? translationConfig?.from }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"block form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursFrom\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursFrom\"\r\n />\r\n\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesFrom\"\r\n [(ngModel)]=\"minutesFrom\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"time--inputs\"></div>\r\n <div class=\"flex gap-2 justify-center items-center mb-5\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ to ?? translationConfig?.to }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursTo\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursTo\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesTo\"\r\n [(ngModel)]=\"minutesTo\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n placeholder=\"00:00 - 00:00\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n ecabsTime\r\n [all]=\"allLabel\"\r\n [timeRange]=\"true\"\r\n (blur)=\"onTouch()\"\r\n (blur)=\"blurChange($event)\"\r\n (keyup)=\"blurChange($event)\"\r\n (keydown)=\"keydownChange($event)\"\r\n />\r\n <button type=\"button\" class=\"text-gray-500 -translate-x-9\" (click)=\"picker.open()\">\r\n <mat-icon>access_time</mat-icon>\r\n </button>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [".time--inputs:after{position:absolute;content:\"\"}.time{width:3.375rem}.fake-input{visibility:hidden;width:0;padding:0}.time--inputs{position:relative;margin-bottom:2.4rem}.time--inputs:after{height:1px;right:0;left:0;background-color:var(--color-gray-300);bottom:-1.6rem}:host ::ng-deep .form-field{margin-right:-1.25rem;margin-left:-.125rem}\n"], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EcabsDigitsOnlyDirective, selector: "[ecabsDigitsOnly]", inputs: ["digitsOnly", "allowHyphen", "decimal", "decimalSeparator", "unit"] }, { kind: "directive", type: EcabsNumberBorderDirective, selector: "[ecabsNumberBorder]", inputs: ["maxValue", "minValue"] }, { kind: "component", type: EcabsDatePickerActionsComponent, selector: "ecabs-date-picker-actions", inputs: ["cancelLabel", "applyLabel", "isDateRange", "disabledApplyButton"], outputs: ["apply"] }, { kind: "directive", type: EcabsMaskTimeDirective, selector: "[ecabsTime]", inputs: ["timeRange", "all"] }] });
|
|
3721
4038
|
}
|
|
3722
4039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateTimeRangePickerComponent, decorators: [{
|
|
3723
4040
|
type: Component,
|
|
@@ -3729,7 +4046,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
3729
4046
|
},
|
|
3730
4047
|
DecimalPipe,
|
|
3731
4048
|
UnsubscribeService,
|
|
3732
|
-
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker\r\n (opened)=\"opened()\"\r\n #picker\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\"\r\n >\r\n <mat-datepicker-actions>\r\n <div class=\"flex flex-col w-full gap-y-4\">\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ from ?? translationConfig?.from }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"block form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursFrom\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursFrom\"\r\n />\r\n\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesFrom\"\r\n [(ngModel)]=\"minutesFrom\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"time--inputs\"></div>\r\n <div class=\"flex gap-2 justify-center items-center mb-5\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ to ?? translationConfig?.to }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursTo\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursTo\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesTo\"\r\n [(ngModel)]=\"minutesTo\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n
|
|
4049
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__input--wrapper w-full\">\r\n <input\r\n class=\"fake-input\"\r\n [id]=\"_date\"\r\n [(ngModel)]=\"_date\"\r\n [placeholder]=\"placeholder\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n [matDatepicker]=\"picker\"\r\n (blur)=\"onTouch()\"\r\n />\r\n <mat-datepicker\r\n (opened)=\"opened()\"\r\n #picker\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\"\r\n >\r\n <mat-datepicker-actions>\r\n <div class=\"flex flex-col w-full gap-y-4\">\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ from ?? translationConfig?.from }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"block form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursFrom\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursFrom\"\r\n />\r\n\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesFrom\"\r\n [(ngModel)]=\"minutesFrom\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"time--inputs\"></div>\r\n <div class=\"flex gap-2 justify-center items-center mb-5\">\r\n <div class=\"flex flex-col justify-center\">\r\n <div class=\"text-center\">{{ to ?? translationConfig?.to }}</div>\r\n <div class=\"flex gap-2 justify-center items-center\">\r\n <input\r\n class=\"form-field__input time\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [id]=\"hoursTo\"\r\n [maxValue]=\"maxValueHours\"\r\n [(ngModel)]=\"hoursTo\"\r\n />\r\n <span class=\"font-bold\">:</span>\r\n <input\r\n class=\"form-field__input time\"\r\n [id]=\"minutesTo\"\r\n [(ngModel)]=\"minutesTo\"\r\n ecabsDigitsOnly\r\n ecabsNumberBorder\r\n [digitsOnly]=\"true\"\r\n [maxValue]=\"maxValueMinutesSeconds\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <ecabs-date-picker-actions [applyLabel]=\"applyLabel ?? translationConfig?.applyLabel\"\r\n [cancelLabel]=\"cancelLabel ?? translationConfig?.cancelLabel\"\r\n (apply)=\"onApply()\">\r\n </ecabs-date-picker-actions>\r\n </div>\r\n </mat-datepicker-actions>\r\n </mat-datepicker>\r\n <input\r\n class=\"form-field__input w-full date-input\"\r\n [id]=\"name\"\r\n [(ngModel)]=\"pickerValue\"\r\n placeholder=\"00:00 - 00:00\"\r\n [disabled]=\"disabled || controlDate?.disabled\"\r\n ecabsTime\r\n [all]=\"allLabel\"\r\n [timeRange]=\"true\"\r\n (blur)=\"onTouch()\"\r\n (blur)=\"blurChange($event)\"\r\n (keyup)=\"blurChange($event)\"\r\n (keydown)=\"keydownChange($event)\"\r\n />\r\n <button type=\"button\" class=\"text-gray-500 -translate-x-9\" (click)=\"picker.open()\">\r\n <mat-icon>access_time</mat-icon>\r\n </button>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [".time--inputs:after{position:absolute;content:\"\"}.time{width:3.375rem}.fake-input{visibility:hidden;width:0;padding:0}.time--inputs{position:relative;margin-bottom:2.4rem}.time--inputs:after{height:1px;right:0;left:0;background-color:var(--color-gray-300);bottom:-1.6rem}:host ::ng-deep .form-field{margin-right:-1.25rem;margin-left:-.125rem}\n"] }]
|
|
3733
4050
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.DecimalPipe }, { type: EcabsDatePickerHeaderService }, { type: UnsubscribeService }]; }, propDecorators: { touchUi: [{
|
|
3734
4051
|
type: Input
|
|
3735
4052
|
}], cancelLabel: [{
|
|
@@ -5429,7 +5746,6 @@ class EcabsTimepickerComponent extends EcabsElementBaseComponent {
|
|
|
5429
5746
|
dayEndLabel;
|
|
5430
5747
|
position = {};
|
|
5431
5748
|
_data = '';
|
|
5432
|
-
inputData = '';
|
|
5433
5749
|
_timePicker;
|
|
5434
5750
|
_input;
|
|
5435
5751
|
listPosition = {};
|
|
@@ -5535,30 +5851,8 @@ class EcabsTimepickerComponent extends EcabsElementBaseComponent {
|
|
|
5535
5851
|
}
|
|
5536
5852
|
return undefined;
|
|
5537
5853
|
}
|
|
5538
|
-
updateInputData(event) {
|
|
5539
|
-
this.inputData = event;
|
|
5540
|
-
this.isHoverItemChanged = false;
|
|
5541
|
-
if (!event) {
|
|
5542
|
-
this.data = event;
|
|
5543
|
-
return;
|
|
5544
|
-
}
|
|
5545
|
-
const newData = this.inputData.replace(new RegExp(/_/gi), '');
|
|
5546
|
-
if (this.checkOutOfRangeNumber(newData)) {
|
|
5547
|
-
this.data = newData;
|
|
5548
|
-
}
|
|
5549
|
-
if (this.data.length === 2 ||
|
|
5550
|
-
(this.data.length === 1 && parseInt(this.data) > 2)) {
|
|
5551
|
-
this.makeHourFull();
|
|
5552
|
-
this.data += ':';
|
|
5553
|
-
}
|
|
5554
|
-
}
|
|
5555
5854
|
checkSpecialKeys(key) {
|
|
5556
5855
|
if (key === 'Tab' || key === ' ' || key === ':') {
|
|
5557
|
-
if (!this.data.includes(':') && this.data.length > 0) {
|
|
5558
|
-
this.makeHourFull();
|
|
5559
|
-
this.data += ':';
|
|
5560
|
-
return 'stop';
|
|
5561
|
-
}
|
|
5562
5856
|
if (key === 'Tab') {
|
|
5563
5857
|
return 'tab';
|
|
5564
5858
|
}
|
|
@@ -5588,31 +5882,6 @@ class EcabsTimepickerComponent extends EcabsElementBaseComponent {
|
|
|
5588
5882
|
}
|
|
5589
5883
|
return false;
|
|
5590
5884
|
}
|
|
5591
|
-
makeHourFull() {
|
|
5592
|
-
const hourPart = this.data.split(':')[0];
|
|
5593
|
-
const minutePart = this.data.split(':').length > 1 ? this.data.split(':')[1] : '';
|
|
5594
|
-
if (hourPart.length === 1) {
|
|
5595
|
-
this.data = '0' + hourPart + (minutePart ? ':' + minutePart : minutePart);
|
|
5596
|
-
}
|
|
5597
|
-
this.inputData = this.data;
|
|
5598
|
-
}
|
|
5599
|
-
makeMinuteFull() {
|
|
5600
|
-
const hourPart = this.data.split(':')[0];
|
|
5601
|
-
const minutePart = this.data.split(':').length > 1 ? this.data.split(':')[1] : '';
|
|
5602
|
-
if (minutePart.length === 0) {
|
|
5603
|
-
this.data = hourPart + ':00';
|
|
5604
|
-
}
|
|
5605
|
-
if (minutePart.length === 1) {
|
|
5606
|
-
this.data = hourPart + ':' + minutePart + '0';
|
|
5607
|
-
}
|
|
5608
|
-
this.inputData = this.data;
|
|
5609
|
-
}
|
|
5610
|
-
fixTimeToNearest() {
|
|
5611
|
-
if (this.data.length > 0) {
|
|
5612
|
-
this.makeHourFull();
|
|
5613
|
-
this.makeMinuteFull();
|
|
5614
|
-
}
|
|
5615
|
-
}
|
|
5616
5885
|
//eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars, @typescript-eslint/no-empty-function
|
|
5617
5886
|
onChangeFn = (_) => { };
|
|
5618
5887
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
@@ -5644,10 +5913,6 @@ class EcabsTimepickerComponent extends EcabsElementBaseComponent {
|
|
|
5644
5913
|
close(val = null) {
|
|
5645
5914
|
if (val && this.isHoverItemChanged) {
|
|
5646
5915
|
this.data = val;
|
|
5647
|
-
this.inputData = val;
|
|
5648
|
-
}
|
|
5649
|
-
else {
|
|
5650
|
-
this.fixTimeToNearest();
|
|
5651
5916
|
}
|
|
5652
5917
|
this.focusedFlag = false;
|
|
5653
5918
|
this.control?.markAsTouched();
|
|
@@ -5659,7 +5924,7 @@ class EcabsTimepickerComponent extends EcabsElementBaseComponent {
|
|
|
5659
5924
|
useExisting: forwardRef(() => EcabsTimepickerComponent),
|
|
5660
5925
|
multi: true,
|
|
5661
5926
|
},
|
|
5662
|
-
], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ disabled: disabled }\">\r\n <ecabs-element-wrapper\r\n [data]=\"getData()\"\r\n [showCloseIcon]=\"showCloseIcon\"\r\n [focusedFlag]=\"focusedFlag\"\r\n (clear)=\"clearInput()\"\r\n >\r\n <div class=\"relative inline-block w-full timeInputFieldWrapper\">\r\n <input\r\n type=\"text\"\r\n class=\"form-field__input\"\r\n [
|
|
5927
|
+
], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ disabled: disabled }\">\r\n <ecabs-element-wrapper\r\n [data]=\"getData()\"\r\n [showCloseIcon]=\"showCloseIcon\"\r\n [focusedFlag]=\"focusedFlag\"\r\n (clear)=\"clearInput()\"\r\n >\r\n <div class=\"relative inline-block w-full timeInputFieldWrapper\">\r\n <input\r\n type=\"text\"\r\n class=\"form-field__input\"\r\n [(ngModel)]=\"data\"\r\n [disabled]=\"disabled\"\r\n ecabsTime\r\n [all]=\"allLabel\"\r\n (focus)=\"show()\"\r\n (click)=\"show()\"\r\n (keydown)=\"inputKeyDown($event)\"\r\n (blur)=\"onTouchedFn()\"\r\n [placeholder]=\"placeholder\"\r\n />\r\n <div class=\"form-field__input--suffix\" *ngIf=\"type !== 'number'\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n </div>\r\n <ecabs-time-list-panel\r\n [typedValue]=\"data\"\r\n *ngIf=\"focusedFlag\"\r\n [showDayStart]=\"showDayStart\"\r\n [dayStartLabel]=\"dayStartLabel\"\r\n [dayEndLabel]=\"dayEndLabel\"\r\n [showDayEnd]=\"showDayEnd\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n class=\"form-time-list absolute inline-block\"\r\n [appendTo]=\"appendTo\"\r\n [listPosition]=\"listPosition\"\r\n (closeMe)=\"close($event)\"\r\n ></ecabs-time-list-panel>\r\n </div>\r\n </ecabs-element-wrapper>\r\n</div>\r\n", styles: [":host::ng-deep .timeInputWrapper ecabs-element-wrapper .form-field{margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "directive", type: EcabsMaskTimeDirective, selector: "[ecabsTime]", inputs: ["timeRange", "all"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: EcabsTimeListPanelComponent, selector: "ecabs-time-list-panel", inputs: ["typedValue", "listPlacement", "listPosition", "dayStartLabel", "dayEndLabel", "appendTo", "min", "max", "showDayStart", "showDayEnd", "position"], outputs: ["onscroll", "closeMe"] }] });
|
|
5663
5928
|
}
|
|
5664
5929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimepickerComponent, decorators: [{
|
|
5665
5930
|
type: Component,
|
|
@@ -5669,7 +5934,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
5669
5934
|
useExisting: forwardRef(() => EcabsTimepickerComponent),
|
|
5670
5935
|
multi: true,
|
|
5671
5936
|
},
|
|
5672
|
-
], template: "<div [ngClass]=\"{ disabled: disabled }\">\r\n <ecabs-element-wrapper\r\n [data]=\"getData()\"\r\n [showCloseIcon]=\"showCloseIcon\"\r\n [focusedFlag]=\"focusedFlag\"\r\n (clear)=\"clearInput()\"\r\n >\r\n <div class=\"relative inline-block w-full timeInputFieldWrapper\">\r\n <input\r\n type=\"text\"\r\n class=\"form-field__input\"\r\n [
|
|
5937
|
+
], template: "<div [ngClass]=\"{ disabled: disabled }\">\r\n <ecabs-element-wrapper\r\n [data]=\"getData()\"\r\n [showCloseIcon]=\"showCloseIcon\"\r\n [focusedFlag]=\"focusedFlag\"\r\n (clear)=\"clearInput()\"\r\n >\r\n <div class=\"relative inline-block w-full timeInputFieldWrapper\">\r\n <input\r\n type=\"text\"\r\n class=\"form-field__input\"\r\n [(ngModel)]=\"data\"\r\n [disabled]=\"disabled\"\r\n ecabsTime\r\n [all]=\"allLabel\"\r\n (focus)=\"show()\"\r\n (click)=\"show()\"\r\n (keydown)=\"inputKeyDown($event)\"\r\n (blur)=\"onTouchedFn()\"\r\n [placeholder]=\"placeholder\"\r\n />\r\n <div class=\"form-field__input--suffix\" *ngIf=\"type !== 'number'\">\r\n <ng-content select=\"mat-icon\"></ng-content>\r\n </div>\r\n <ecabs-time-list-panel\r\n [typedValue]=\"data\"\r\n *ngIf=\"focusedFlag\"\r\n [showDayStart]=\"showDayStart\"\r\n [dayStartLabel]=\"dayStartLabel\"\r\n [dayEndLabel]=\"dayEndLabel\"\r\n [showDayEnd]=\"showDayEnd\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n class=\"form-time-list absolute inline-block\"\r\n [appendTo]=\"appendTo\"\r\n [listPosition]=\"listPosition\"\r\n (closeMe)=\"close($event)\"\r\n ></ecabs-time-list-panel>\r\n </div>\r\n </ecabs-element-wrapper>\r\n</div>\r\n", styles: [":host::ng-deep .timeInputWrapper ecabs-element-wrapper .form-field{margin-bottom:0}\n"] }]
|
|
5673
5938
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: FormTimePickerService }, { type: i0.Injector }, { type: i0.DestroyRef }]; }, propDecorators: { focusedFlag: [{
|
|
5674
5939
|
type: Input
|
|
5675
5940
|
}, {
|
|
@@ -6652,42 +6917,15 @@ class EcabsTimeRangeDirective {
|
|
|
6652
6917
|
isDateTimeMask = false;
|
|
6653
6918
|
considerSeconds = false;
|
|
6654
6919
|
all = 'All';
|
|
6655
|
-
|
|
6656
|
-
maskDateTime = [
|
|
6657
|
-
/\d/,
|
|
6658
|
-
/\d/,
|
|
6659
|
-
':',
|
|
6660
|
-
/\d/,
|
|
6661
|
-
/\d/,
|
|
6662
|
-
' ',
|
|
6663
|
-
'-',
|
|
6664
|
-
' ',
|
|
6665
|
-
/\d/,
|
|
6666
|
-
/\d/,
|
|
6667
|
-
':',
|
|
6668
|
-
/\d/,
|
|
6669
|
-
/\d/,
|
|
6670
|
-
];
|
|
6920
|
+
maskedInput = null;
|
|
6671
6921
|
constructor(element) {
|
|
6672
6922
|
this.element = element;
|
|
6673
6923
|
}
|
|
6674
6924
|
ngOnInit() {
|
|
6675
|
-
this.
|
|
6676
|
-
inputElement: this.element.nativeElement,
|
|
6677
|
-
guide: true,
|
|
6678
|
-
showMask: false,
|
|
6679
|
-
keepCharPositions: true,
|
|
6680
|
-
mask: this.maskDateTime,
|
|
6681
|
-
pipe: function (conformedValue) {
|
|
6682
|
-
if (conformedValue === '__:__ - __:__') {
|
|
6683
|
-
return this.all;
|
|
6684
|
-
}
|
|
6685
|
-
return conformedValue;
|
|
6686
|
-
},
|
|
6687
|
-
});
|
|
6925
|
+
this.maskedInput = new Maskito(this.element.nativeElement, createTimeRangeMaskOptions());
|
|
6688
6926
|
}
|
|
6689
6927
|
ngOnDestroy() {
|
|
6690
|
-
this.
|
|
6928
|
+
this.maskedInput?.destroy();
|
|
6691
6929
|
}
|
|
6692
6930
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6693
6931
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EcabsTimeRangeDirective, selector: "[ecabsTimeRange]", inputs: { isDateTimeMask: "isDateTimeMask", considerSeconds: "considerSeconds", all: "all" }, ngImport: i0 });
|
|
@@ -8381,6 +8619,215 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8381
8619
|
}]
|
|
8382
8620
|
}] });
|
|
8383
8621
|
|
|
8622
|
+
class FormTimePickerServiceV2 {
|
|
8623
|
+
config = {
|
|
8624
|
+
dayEnd: 'Day End',
|
|
8625
|
+
dayStart: 'Day Start',
|
|
8626
|
+
iconClass: '',
|
|
8627
|
+
};
|
|
8628
|
+
closeSub = new Subject();
|
|
8629
|
+
setConfig(c) {
|
|
8630
|
+
this.config = Object.assign(this.config, c);
|
|
8631
|
+
}
|
|
8632
|
+
getConfig() {
|
|
8633
|
+
return this.config;
|
|
8634
|
+
}
|
|
8635
|
+
close() {
|
|
8636
|
+
this.closeSub.next(true);
|
|
8637
|
+
}
|
|
8638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormTimePickerServiceV2, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8639
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormTimePickerServiceV2, providedIn: 'root' });
|
|
8640
|
+
}
|
|
8641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormTimePickerServiceV2, decorators: [{
|
|
8642
|
+
type: Injectable,
|
|
8643
|
+
args: [{
|
|
8644
|
+
providedIn: 'root',
|
|
8645
|
+
}]
|
|
8646
|
+
}] });
|
|
8647
|
+
|
|
8648
|
+
class EcabsTimeRangeInputV2Component extends EcabsElementBaseComponent {
|
|
8649
|
+
injector;
|
|
8650
|
+
destroyRef;
|
|
8651
|
+
showCloseIcon = false;
|
|
8652
|
+
listPlacement = 'auto';
|
|
8653
|
+
appendTo;
|
|
8654
|
+
min;
|
|
8655
|
+
max;
|
|
8656
|
+
showDayStart = true;
|
|
8657
|
+
showDayEnd = false;
|
|
8658
|
+
addSecond = true;
|
|
8659
|
+
dayStartLabel;
|
|
8660
|
+
dayEndLabel;
|
|
8661
|
+
separatorLabel = 'to';
|
|
8662
|
+
startTimePlaceholder;
|
|
8663
|
+
endTimePlaceholder;
|
|
8664
|
+
val;
|
|
8665
|
+
_timeFrom;
|
|
8666
|
+
_timeTo;
|
|
8667
|
+
get value() {
|
|
8668
|
+
return this.val;
|
|
8669
|
+
}
|
|
8670
|
+
get timeFrom() {
|
|
8671
|
+
return this._timeFrom;
|
|
8672
|
+
}
|
|
8673
|
+
get timeTo() {
|
|
8674
|
+
return this._timeTo;
|
|
8675
|
+
}
|
|
8676
|
+
//eslint-disable-next-line
|
|
8677
|
+
set value(val) {
|
|
8678
|
+
if (this.val !== val) {
|
|
8679
|
+
this.val = val;
|
|
8680
|
+
this.timeFrom = val.timeFrom;
|
|
8681
|
+
this.timeTo = val.timeTo;
|
|
8682
|
+
this.onChange(val);
|
|
8683
|
+
this.onTouch(val);
|
|
8684
|
+
}
|
|
8685
|
+
}
|
|
8686
|
+
//eslint-disable-next-line
|
|
8687
|
+
set timeFrom(val) {
|
|
8688
|
+
if (this._timeFrom !== val) {
|
|
8689
|
+
this._timeFrom = val;
|
|
8690
|
+
this.onApply();
|
|
8691
|
+
}
|
|
8692
|
+
}
|
|
8693
|
+
//eslint-disable-next-line
|
|
8694
|
+
set timeTo(val) {
|
|
8695
|
+
if (this._timeTo !== val) {
|
|
8696
|
+
this._timeTo = val;
|
|
8697
|
+
this.onApply();
|
|
8698
|
+
}
|
|
8699
|
+
}
|
|
8700
|
+
constructor(injector, destroyRef) {
|
|
8701
|
+
super();
|
|
8702
|
+
this.injector = injector;
|
|
8703
|
+
this.destroyRef = destroyRef;
|
|
8704
|
+
}
|
|
8705
|
+
ngAfterViewInit() {
|
|
8706
|
+
const ngControl = this.injector.get(NgControl, null);
|
|
8707
|
+
if (ngControl) {
|
|
8708
|
+
this.control = ngControl.control;
|
|
8709
|
+
this.control.valueChanges
|
|
8710
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
8711
|
+
.subscribe(() => this.timeRangeValidator(this.control));
|
|
8712
|
+
}
|
|
8713
|
+
}
|
|
8714
|
+
onChange = () => { };
|
|
8715
|
+
onTouch = () => { };
|
|
8716
|
+
writeValue(value) {
|
|
8717
|
+
this.value = value;
|
|
8718
|
+
}
|
|
8719
|
+
registerOnChange(fn) {
|
|
8720
|
+
this.onChange = fn;
|
|
8721
|
+
}
|
|
8722
|
+
registerOnTouched(fn) {
|
|
8723
|
+
this.onTouch = fn;
|
|
8724
|
+
}
|
|
8725
|
+
onApply() {
|
|
8726
|
+
const newValue = {
|
|
8727
|
+
timeFrom: this.timeFrom,
|
|
8728
|
+
timeTo: this.timeTo,
|
|
8729
|
+
};
|
|
8730
|
+
if (!isEqual$1(this.value, newValue)) {
|
|
8731
|
+
this.value = {
|
|
8732
|
+
timeFrom: this.timeFrom,
|
|
8733
|
+
timeTo: this.timeTo,
|
|
8734
|
+
};
|
|
8735
|
+
}
|
|
8736
|
+
}
|
|
8737
|
+
timeRangeValidator(control) {
|
|
8738
|
+
const required = control.hasValidator(Validators.required);
|
|
8739
|
+
if (control.value) {
|
|
8740
|
+
const { timeFrom, timeTo } = control.value;
|
|
8741
|
+
control.setErrors(null);
|
|
8742
|
+
if (required && (!timeFrom || timeFrom?.length === 0) && (!timeTo || timeTo?.length === 0)) {
|
|
8743
|
+
control.setErrors({ required: true });
|
|
8744
|
+
return;
|
|
8745
|
+
}
|
|
8746
|
+
if (!timeFrom && timeTo) {
|
|
8747
|
+
control.setErrors({ timeFromRangeRequired: true });
|
|
8748
|
+
return;
|
|
8749
|
+
}
|
|
8750
|
+
if (timeFrom && !timeTo) {
|
|
8751
|
+
control.setErrors({ timeToRangeRequired: true });
|
|
8752
|
+
return;
|
|
8753
|
+
}
|
|
8754
|
+
if (timeFrom > timeTo) {
|
|
8755
|
+
control.setErrors({ timeFromMoreThanTimeTo: true });
|
|
8756
|
+
return;
|
|
8757
|
+
}
|
|
8758
|
+
}
|
|
8759
|
+
}
|
|
8760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Component, deps: [{ token: i0.Injector }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
8761
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsTimeRangeInputV2Component, selector: "ecabs-time-range-input-v2", inputs: { showCloseIcon: "showCloseIcon", listPlacement: "listPlacement", appendTo: "appendTo", min: "min", max: "max", showDayStart: "showDayStart", showDayEnd: "showDayEnd", addSecond: "addSecond", dayStartLabel: "dayStartLabel", dayEndLabel: "dayEndLabel", separatorLabel: "separatorLabel", startTimePlaceholder: "startTimePlaceholder", endTimePlaceholder: "endTimePlaceholder" }, providers: [
|
|
8762
|
+
{
|
|
8763
|
+
provide: NG_VALUE_ACCESSOR,
|
|
8764
|
+
useExisting: forwardRef(() => EcabsTimeRangeInputV2Component),
|
|
8765
|
+
multi: true,
|
|
8766
|
+
},
|
|
8767
|
+
], usesInheritance: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <ecabs-timepicker \r\n [label]=\"startTimePlaceholder\" \r\n [(ngModel)]=\"timeFrom\" \r\n [dayStartLabel]=\"dayStartLabel\" \r\n [dayEndLabel]=\"dayEndLabel\">\r\n </ecabs-timepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <ecabs-timepicker \r\n [label]=\"endTimePlaceholder\" \r\n [(ngModel)]=\"timeTo\" \r\n [dayStartLabel]=\"dayStartLabel\"\r\n [dayEndLabel]=\"dayEndLabel\">\r\n </ecabs-timepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>", styles: [":host::ng-deep input{border:none;padding:0;text-align:center}:host::ng-deep ecabs-timepicker .form-field{margin:0}:host::ng-deep ecabs-time-list-panel{width:calc(100% + 2rem);margin-left:-1rem;margin-top:calc(.5rem + 1px)}\n"], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: EcabsTimepickerComponent, selector: "ecabs-timepicker", inputs: ["focusedFlag", "showCloseIcon", "listPlacement", "appendTo", "min", "max", "showDayStart", "showDayEnd", "addSecond", "dayStartLabel", "dayEndLabel"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
8768
|
+
}
|
|
8769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Component, decorators: [{
|
|
8770
|
+
type: Component,
|
|
8771
|
+
args: [{ selector: 'ecabs-time-range-input-v2', providers: [
|
|
8772
|
+
{
|
|
8773
|
+
provide: NG_VALUE_ACCESSOR,
|
|
8774
|
+
useExisting: forwardRef(() => EcabsTimeRangeInputV2Component),
|
|
8775
|
+
multi: true,
|
|
8776
|
+
},
|
|
8777
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <ecabs-timepicker \r\n [label]=\"startTimePlaceholder\" \r\n [(ngModel)]=\"timeFrom\" \r\n [dayStartLabel]=\"dayStartLabel\" \r\n [dayEndLabel]=\"dayEndLabel\">\r\n </ecabs-timepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <ecabs-timepicker \r\n [label]=\"endTimePlaceholder\" \r\n [(ngModel)]=\"timeTo\" \r\n [dayStartLabel]=\"dayStartLabel\"\r\n [dayEndLabel]=\"dayEndLabel\">\r\n </ecabs-timepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>", styles: [":host::ng-deep input{border:none;padding:0;text-align:center}:host::ng-deep ecabs-timepicker .form-field{margin:0}:host::ng-deep ecabs-time-list-panel{width:calc(100% + 2rem);margin-left:-1rem;margin-top:calc(.5rem + 1px)}\n"] }]
|
|
8778
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.DestroyRef }]; }, propDecorators: { showCloseIcon: [{
|
|
8779
|
+
type: Input
|
|
8780
|
+
}], listPlacement: [{
|
|
8781
|
+
type: Input
|
|
8782
|
+
}], appendTo: [{
|
|
8783
|
+
type: Input
|
|
8784
|
+
}], min: [{
|
|
8785
|
+
type: Input
|
|
8786
|
+
}], max: [{
|
|
8787
|
+
type: Input
|
|
8788
|
+
}], showDayStart: [{
|
|
8789
|
+
type: Input
|
|
8790
|
+
}], showDayEnd: [{
|
|
8791
|
+
type: Input
|
|
8792
|
+
}], addSecond: [{
|
|
8793
|
+
type: Input
|
|
8794
|
+
}], dayStartLabel: [{
|
|
8795
|
+
type: Input
|
|
8796
|
+
}], dayEndLabel: [{
|
|
8797
|
+
type: Input
|
|
8798
|
+
}], separatorLabel: [{
|
|
8799
|
+
type: Input
|
|
8800
|
+
}], startTimePlaceholder: [{
|
|
8801
|
+
type: Input
|
|
8802
|
+
}], endTimePlaceholder: [{
|
|
8803
|
+
type: Input
|
|
8804
|
+
}] } });
|
|
8805
|
+
|
|
8806
|
+
class EcabsTimeRangeInputV2Module {
|
|
8807
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
8808
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Module, declarations: [EcabsTimeRangeInputV2Component], imports: [CommonModule,
|
|
8809
|
+
ElementWrapperModule,
|
|
8810
|
+
EcabsTimepickerModule,
|
|
8811
|
+
FormsModule], exports: [EcabsTimeRangeInputV2Component] });
|
|
8812
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Module, imports: [CommonModule,
|
|
8813
|
+
ElementWrapperModule,
|
|
8814
|
+
EcabsTimepickerModule,
|
|
8815
|
+
FormsModule] });
|
|
8816
|
+
}
|
|
8817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsTimeRangeInputV2Module, decorators: [{
|
|
8818
|
+
type: NgModule,
|
|
8819
|
+
args: [{
|
|
8820
|
+
declarations: [EcabsTimeRangeInputV2Component],
|
|
8821
|
+
imports: [
|
|
8822
|
+
CommonModule,
|
|
8823
|
+
ElementWrapperModule,
|
|
8824
|
+
EcabsTimepickerModule,
|
|
8825
|
+
FormsModule,
|
|
8826
|
+
],
|
|
8827
|
+
exports: [EcabsTimeRangeInputV2Component],
|
|
8828
|
+
}]
|
|
8829
|
+
}] });
|
|
8830
|
+
|
|
8384
8831
|
class EcabsChipGroupComponent {
|
|
8385
8832
|
options = [];
|
|
8386
8833
|
multiple = true;
|
|
@@ -8825,9 +9272,6 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
|
|
|
8825
9272
|
return;
|
|
8826
9273
|
}
|
|
8827
9274
|
}
|
|
8828
|
-
if (!control.errors) {
|
|
8829
|
-
control.setErrors(required ? { required: true } : null);
|
|
8830
|
-
}
|
|
8831
9275
|
}
|
|
8832
9276
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateRangePickerComponentV2, deps: [{ token: i0.Injector }, { token: EcabsDatePickerHeaderService }, { token: UnsubscribeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
8833
9277
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: EcabsDateRangePickerComponentV2, selector: "ecabs-date-range-picker-v2", inputs: { minDate: "minDate", maxDate: "maxDate", touchUi: "touchUi", cancelLabel: "cancelLabel", applyLabel: "applyLabel", startDatePlaceholder: "startDatePlaceholder", endDatePlaceholder: "endDatePlaceholder", separatorLabel: "separatorLabel", excludeHolidays: "excludeHolidays", excludeWeekends: "excludeWeekends", specificDates: "specificDates", holidayOptions: "holidayOptions" }, outputs: { onblur: "onblur" }, providers: [
|
|
@@ -8837,7 +9281,7 @@ class EcabsDateRangePickerComponentV2 extends EcabsElementBaseComponent {
|
|
|
8837
9281
|
multi: true,
|
|
8838
9282
|
},
|
|
8839
9283
|
UnsubscribeService,
|
|
8840
|
-
], viewQueries: [{ propertyName: "pickerTo", first: true, predicate: ["pickerTo"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [""], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
9284
|
+
], viewQueries: [{ propertyName: "pickerTo", first: true, predicate: ["pickerTo"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n", styles: [""], dependencies: [{ kind: "component", type: EcabsElementWrapperComponent, selector: "ecabs-element-wrapper", inputs: ["data", "showCloseIcon", "focusedFlag", "showPassword", "control"], outputs: ["showHidePassword", "clear", "increase", "decrease"] }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EcabsMaskDateDirective, selector: "[ecabsMaskDate]", inputs: ["isDateTimeMask", "considerSeconds"] }] });
|
|
8841
9285
|
}
|
|
8842
9286
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EcabsDateRangePickerComponentV2, decorators: [{
|
|
8843
9287
|
type: Component,
|
|
@@ -8848,7 +9292,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8848
9292
|
multi: true,
|
|
8849
9293
|
},
|
|
8850
9294
|
UnsubscribeService,
|
|
8851
|
-
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n" }]
|
|
9295
|
+
], template: "<ecabs-element-wrapper [data]=\"getData()\">\r\n <div class=\"form-field__range--wrapper\">\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateFrom' }}\"\r\n [(ngModel)]=\"dateFrom\"\r\n [placeholder]=\"startDatePlaceholder ?? translationConfig?.startDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerFrom\"\r\n [min]=\"minDateFrom\"\r\n [max]=\"maxDateFrom\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerFrom.open()\"\r\n />\r\n <mat-datepicker #pickerFrom\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n\r\n <span class=\"text-gray-400 px-3 text-sm\">{{ separatorLabel }}</span>\r\n <div class=\"form-field__range\">\r\n <input\r\n class=\"border-none w-full\"\r\n id=\"{{ name + 'dateTo' }}\"\r\n [(ngModel)]=\"dateTo\"\r\n [placeholder]=\"endDatePlaceholder ?? translationConfig?.endDatePlaceholder\"\r\n [disabled]=\"disabled\"\r\n [matDatepicker]=\"pickerTo\"\r\n [min]=\"minDateTo\"\r\n [max]=\"maxDateTo\"\r\n [matDatepickerFilter]=\"filterDateRange\"\r\n ecabsMaskDate\r\n (blur)=\"onTouch()\"\r\n (click)=\"pickerTo.open()\"\r\n />\r\n <mat-datepicker #pickerTo\r\n [panelClass]=\"panelClass\"\r\n [calendarHeaderComponent]=\"header\"\r\n [touchUi]=\"touchUi\">\r\n </mat-datepicker>\r\n </div>\r\n </div>\r\n</ecabs-element-wrapper>\r\n" }]
|
|
8852
9296
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: EcabsDatePickerHeaderService }, { type: UnsubscribeService }]; }, propDecorators: { minDate: [{
|
|
8853
9297
|
type: Input
|
|
8854
9298
|
}], maxDate: [{
|
|
@@ -8943,5 +9387,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8943
9387
|
* Generated bundle index. Do not edit.
|
|
8944
9388
|
*/
|
|
8945
9389
|
|
|
8946
|
-
export { ButtonsComponent, ButtonsV2Component, EcabsActiveStatusFilterComponent, EcabsActiveStatusFilterModule, EcabsAttachEmbeddedViewDirective, EcabsAttachEmbeddedViewDirectiveModule, EcabsBasePhoneComponent, EcabsBasePhoneModule, EcabsBreadcrumbComponent, EcabsBreadcrumbModule, EcabsButtonToggleComponent, EcabsButtonToggleModule, EcabsButtonsModule, EcabsButtonsV2Module, EcabsCheckPermissionDirectiveModule, EcabsCheckPermissionsDirective, EcabsCheckboxToggleComponent, EcabsCheckboxToggleModule, EcabsChipAutocompleteComponent, EcabsChipGroupComponent, EcabsChipGroupModule, EcabsComponentsService, EcabsDateAdapter, EcabsDatePickerComponent, EcabsDatePickerHeaderComponent, EcabsDatePickerHeaderService, EcabsDatePickerModule, EcabsDateRangeModule, EcabsDateRangeModuleV2, EcabsDateRangePickerComponent, EcabsDateRangePickerComponentV2, EcabsDateRangePickerHeaderComponent, EcabsDateRangePickerHeaderComponentV2, EcabsDateTimePickerComponent, EcabsDateTimePickerHeaderComponent, EcabsDateTimeRangePickerComponent, EcabsDateTimeRangePickerHeaderComponent, EcabsDatetimePickerModule, EcabsDatetimeRangePickerModule, EcabsDialogConfirmComponent, EcabsDialogConfirmDeletionModule, EcabsDialogConfirmModule, EcabsDialogConfirmationDeletionComponent, EcabsDialogMessageComponent, EcabsDialogMessageModule, EcabsDigitsOnlyDirective, EcabsDigitsOnlyDirectivesModule, EcabsDomObserverDirective, EcabsDomObserverDirectiveModule, EcabsDynamicBgColorDirective, EcabsDynamicBgColorDirectiveModule, EcabsElementMultiplierDirective, EcabsElementMultiplierDirectiveModule, EcabsEmptyPlaceholderComponent, EcabsEmptyPlaceholderModule, EcabsExpansionPanelComponent, EcabsExpansionPanelModule, EcabsFileDropDirective, EcabsFileDropDirectiveModule, EcabsHeaderComponent, EcabsHeaderModule, EcabsHintComponent, EcabsHintModule, EcabsIncrementComponent, EcabsIncrementModule, EcabsInputComponent, EcabsInputModule, EcabsLanguageSelectorComponent, EcabsLanguageSelectorModule, EcabsLoadingComponent, EcabsLoadingModule, EcabsLogoComponent, EcabsLogoModule, EcabsMaskDateDirective, EcabsMaskDateDirectiveModule, EcabsMaskTimeDirective, EcabsMaskTimeDirectiveModule, EcabsMaxDirective, EcabsMenuItemsComponent, EcabsMenuItemsModule, EcabsMinDirective, EcabsMinMaxDirectiveModule, EcabsMultipleDatesPickerComponent, EcabsMultipleDatesPickerModule, EcabsNoteComponent, EcabsNoteModule, EcabsNumberBorderDirective, EcabsNumberBorderDirectiveModule, EcabsPaginatorDirective, EcabsPaginatorDirectiveModule, EcabsPhoneComponent, EcabsPhoneModule, EcabsPipesModule, EcabsPlaceAutocompleteComponent, EcabsPlaceAutocompleteModule, EcabsPlaceAutocompleteV2Component, EcabsPlaceAutocompleteV2Module, EcabsProfileComponent, EcabsProfileModule, EcabsRadioButtonListComponent, EcabsRadioButtonListModule, EcabsSelectComponent, EcabsSelectModule, EcabsSelectV2Component, EcabsSelectV2Module, EcabsShowOnTruncatedDirective, EcabsShowOnTruncatedDirectiveModule, EcabsSidebarComponent, EcabsSidebarModule, EcabsSliderComponent, EcabsSliderModule, EcabsSpinnerComponent, EcabsTableFilterWrapperComponent, EcabsTableFilterWrapperModule, EcabsTableModule, EcabsTextAreaModule, EcabsTextareaComponent, EcabsTimeListPanelComponent, EcabsTimeRangeDirective, EcabsTimeRangeDirectiveModule, EcabsTimepickerComponent, EcabsTimepickerModule, EcabsTooltipIfTruncatedDirective, EcabsTooltipIfTruncatedDirectiveModule, EcabsTruncatePipe, EcabsUppercaseMaskDirective, EcabsUppercaseMaskDirectiveModule, EcabsValidationComponent, EcabsValidationModule, EcabsValidationViewModule, FormTimePickerService, GenericComponentConfig, HeaderService, MATERIAL_DATETIMEPICKER_FORMATS, NumberToCountryCodePipe, SeparatorAppendPipe, TableComponent, UnsubscribeService, ValidationComponent, WAYPOINT_SUGGESTIONS, WAYPOINT_SUGGESTIONS2, WaypointTypeEnum, getRandomItems, removeEmpty, removeNullUndefineds, scrollFactory, sortGeneric };
|
|
9390
|
+
export { ButtonsComponent, ButtonsV2Component, EcabsActiveStatusFilterComponent, EcabsActiveStatusFilterModule, EcabsAttachEmbeddedViewDirective, EcabsAttachEmbeddedViewDirectiveModule, EcabsBasePhoneComponent, EcabsBasePhoneModule, EcabsBreadcrumbComponent, EcabsBreadcrumbModule, EcabsButtonToggleComponent, EcabsButtonToggleModule, EcabsButtonsModule, EcabsButtonsV2Module, EcabsCheckPermissionDirectiveModule, EcabsCheckPermissionsDirective, EcabsCheckboxToggleComponent, EcabsCheckboxToggleModule, EcabsCheckboxV2Component, EcabsCheckboxV2Module, EcabsChipAutocompleteComponent, EcabsChipGroupComponent, EcabsChipGroupModule, EcabsComponentsService, EcabsDateAdapter, EcabsDatePickerComponent, EcabsDatePickerHeaderComponent, EcabsDatePickerHeaderService, EcabsDatePickerModule, EcabsDateRangeModule, EcabsDateRangeModuleV2, EcabsDateRangePickerComponent, EcabsDateRangePickerComponentV2, EcabsDateRangePickerHeaderComponent, EcabsDateRangePickerHeaderComponentV2, EcabsDateTimePickerComponent, EcabsDateTimePickerHeaderComponent, EcabsDateTimeRangePickerComponent, EcabsDateTimeRangePickerHeaderComponent, EcabsDatetimePickerModule, EcabsDatetimeRangePickerModule, EcabsDialogConfirmComponent, EcabsDialogConfirmDeletionModule, EcabsDialogConfirmModule, EcabsDialogConfirmationDeletionComponent, EcabsDialogMessageComponent, EcabsDialogMessageModule, EcabsDigitsOnlyDirective, EcabsDigitsOnlyDirectivesModule, EcabsDomObserverDirective, EcabsDomObserverDirectiveModule, EcabsDynamicBgColorDirective, EcabsDynamicBgColorDirectiveModule, EcabsElementMultiplierDirective, EcabsElementMultiplierDirectiveModule, EcabsEmptyPlaceholderComponent, EcabsEmptyPlaceholderModule, EcabsExpansionPanelComponent, EcabsExpansionPanelModule, EcabsFileDropDirective, EcabsFileDropDirectiveModule, EcabsHeaderComponent, EcabsHeaderModule, EcabsHintComponent, EcabsHintModule, EcabsIncrementComponent, EcabsIncrementModule, EcabsInputComponent, EcabsInputModule, EcabsInputRangeComponent, EcabsInputRangeModule, EcabsLanguageSelectorComponent, EcabsLanguageSelectorModule, EcabsLoadingComponent, EcabsLoadingModule, EcabsLogoComponent, EcabsLogoModule, EcabsMaskDateDirective, EcabsMaskDateDirectiveModule, EcabsMaskTimeDirective, EcabsMaskTimeDirectiveModule, EcabsMaxDirective, EcabsMenuItemsComponent, EcabsMenuItemsModule, EcabsMinDirective, EcabsMinMaxDirectiveModule, EcabsMultipleDatesPickerComponent, EcabsMultipleDatesPickerModule, EcabsNoteComponent, EcabsNoteModule, EcabsNumberBorderDirective, EcabsNumberBorderDirectiveModule, EcabsPaginatorDirective, EcabsPaginatorDirectiveModule, EcabsPhoneComponent, EcabsPhoneModule, EcabsPipesModule, EcabsPlaceAutocompleteComponent, EcabsPlaceAutocompleteModule, EcabsPlaceAutocompleteV2Component, EcabsPlaceAutocompleteV2Module, EcabsProfileComponent, EcabsProfileModule, EcabsRadioButtonListComponent, EcabsRadioButtonListModule, EcabsSelectComponent, EcabsSelectModule, EcabsSelectV2Component, EcabsSelectV2Module, EcabsShowOnTruncatedDirective, EcabsShowOnTruncatedDirectiveModule, EcabsSidebarComponent, EcabsSidebarModule, EcabsSliderComponent, EcabsSliderModule, EcabsSpinnerComponent, EcabsTableFilterWrapperComponent, EcabsTableFilterWrapperModule, EcabsTableModule, EcabsTextAreaModule, EcabsTextareaComponent, EcabsTimeListPanelComponent, EcabsTimeRangeDirective, EcabsTimeRangeDirectiveModule, EcabsTimeRangeInputV2Component, EcabsTimeRangeInputV2Module, EcabsTimepickerComponent, EcabsTimepickerModule, EcabsTooltipIfTruncatedDirective, EcabsTooltipIfTruncatedDirectiveModule, EcabsTruncatePipe, EcabsUppercaseMaskDirective, EcabsUppercaseMaskDirectiveModule, EcabsValidationComponent, EcabsValidationModule, EcabsValidationViewModule, FormTimePickerService, FormTimePickerServiceV2, GenericComponentConfig, HeaderService, MATERIAL_DATETIMEPICKER_FORMATS, NumberToCountryCodePipe, SeparatorAppendPipe, TableComponent, UnsubscribeService, ValidationComponent, WAYPOINT_SUGGESTIONS, WAYPOINT_SUGGESTIONS2, WaypointTypeEnum, getRandomItems, removeEmpty, removeNullUndefineds, scrollFactory, sortGeneric };
|
|
8947
9391
|
//# sourceMappingURL=ecabs-components.mjs.map
|