i-tech-shared-components 1.4.63 → 1.4.64-alpha.1771527204138
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.
|
@@ -3,7 +3,7 @@ import { Pipe, inject, Injectable, HostListener, Input, Directive, EventEmitter,
|
|
|
3
3
|
import * as i1 from '@ngx-translate/core';
|
|
4
4
|
import { TranslateModule, TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
6
|
-
import { NgControl, FormControlName, ReactiveFormsModule, UntypedFormGroup, UntypedFormControl,
|
|
6
|
+
import { NgControl, FormControlName, ReactiveFormsModule, UntypedFormGroup, UntypedFormControl, FormsModule } from '@angular/forms';
|
|
7
7
|
import moment from 'moment';
|
|
8
8
|
import * as momentTimezone from 'moment-timezone';
|
|
9
9
|
import { MatIconButton, MatFabButton, MatButton, MatButtonModule } from '@angular/material/button';
|
|
@@ -1546,8 +1546,8 @@ class DateRangeDatepickerComponent {
|
|
|
1546
1546
|
this.LabelTypeEnum = LabelTypeEnum;
|
|
1547
1547
|
this.calendarClickCount = 0;
|
|
1548
1548
|
this.dateRangeForm = new UntypedFormGroup({
|
|
1549
|
-
startDate: new UntypedFormControl(''
|
|
1550
|
-
endDate: new UntypedFormControl(''
|
|
1549
|
+
startDate: new UntypedFormControl(''),
|
|
1550
|
+
endDate: new UntypedFormControl('')
|
|
1551
1551
|
});
|
|
1552
1552
|
this.customErrorStateMatcher = {
|
|
1553
1553
|
isErrorState: (control, form) => {
|
|
@@ -1614,11 +1614,6 @@ class DateRangeDatepickerComponent {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
element.blur();
|
|
1616
1616
|
}
|
|
1617
|
-
keyEventHandler(event, value, element) {
|
|
1618
|
-
if (event.code === 'Enter') {
|
|
1619
|
-
this.setDate(value, element);
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
1617
|
onPresetAction(action) {
|
|
1623
1618
|
this.presetActionClick.emit({ label: action.label });
|
|
1624
1619
|
this.picker.close();
|
|
@@ -1658,7 +1653,7 @@ class DateRangeDatepickerComponent {
|
|
|
1658
1653
|
this.selectionSub?.unsubscribe();
|
|
1659
1654
|
}
|
|
1660
1655
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateRangeDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1661
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DateRangeDatepickerComponent, isStandalone: true, selector: "i-tech-mat-range-datepicker", inputs: { label: "label", placeholder: "placeholder", value: "value", defaultValue: "defaultValue", key: "key", submit: "submit", clearValue: "clearValue", errorMessage: "errorMessage", onePlaceholder: "onePlaceholder", hintText: "hintText", testId: "testId", panelClass: "panelClass", presetActions: "presetActions", activePreset: "activePreset" }, outputs: { resetForm: "resetForm", selectionChange: "selectionChange", presetActionClick: "presetActionClick" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "min", first: true, predicate: ["min"], descendants: true }, { propertyName: "max", first: true, predicate: ["max"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex_column relative mat-date-range-input\"\n [formGroup]=\"dateRangeForm\"\n>\n <div class=\"w-100\" *ngIf=\"label\">\n <mat-label>\n {{ (label || '') | translate }}\n </mat-label>\n </div>\n <mat-form-field appearance=\"outline\" [ngClass]=\"{'opened_calendar': isOpen}\">\n <mat-date-range-input [rangePicker]=\"picker\"\n\n >\n <input formControlName=\"startDate\"\n [attr.data-testId]=\"'date-range-' + testId + '-min-date'\"\n [placeholder]=\" (placeholder ? placeholder[0] : 'Start Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-accessKey]=\"key ? key.start : 'minStartDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matStartDate #min\n
|
|
1656
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: DateRangeDatepickerComponent, isStandalone: true, selector: "i-tech-mat-range-datepicker", inputs: { label: "label", placeholder: "placeholder", value: "value", defaultValue: "defaultValue", key: "key", submit: "submit", clearValue: "clearValue", errorMessage: "errorMessage", onePlaceholder: "onePlaceholder", hintText: "hintText", testId: "testId", panelClass: "panelClass", presetActions: "presetActions", activePreset: "activePreset" }, outputs: { resetForm: "resetForm", selectionChange: "selectionChange", presetActionClick: "presetActionClick" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true }, { propertyName: "min", first: true, predicate: ["min"], descendants: true }, { propertyName: "max", first: true, predicate: ["max"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex_column relative mat-date-range-input\"\n [formGroup]=\"dateRangeForm\"\n>\n <div class=\"w-100\" *ngIf=\"label\">\n <mat-label>\n {{ (label || '') | translate }}\n </mat-label>\n </div>\n <mat-form-field appearance=\"outline\" [ngClass]=\"{'opened_calendar': isOpen}\">\n <mat-date-range-input [rangePicker]=\"picker\"\n\n >\n <input formControlName=\"startDate\"\n [attr.data-testId]=\"'date-range-' + testId + '-min-date'\"\n [placeholder]=\" (placeholder ? placeholder[0] : 'Start Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-accessKey]=\"key ? key.start : 'minStartDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matStartDate #min\n readonly\n [errorStateMatcher]=\"customErrorStateMatcher\"\n (dateChange)=\"setDate([min.value, max.value || null],min)\">\n <input formControlName=\"endDate\"\n [placeholder]=\"(placeholder ? placeholder[1] : 'End Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-testId]=\"'date-range-' + testId + '-end-date'\"\n [attr.data-accessKey]=\"key ? key.end : 'maxEndDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matEndDate #max\n readonly\n [errorStateMatcher]=\"customErrorStateMatcher\"\n (dateChange)=\"setDate([min.value, max.value || null],max)\">\n </mat-date-range-input>\n <i-tech-icon-button matSuffix\n [iconName]=\"'cancel'\"\n (buttonClick)=\"setDate([null,null], max)\"\n class=\"default-form-icon-color\"\n *ngIf=\"dateRangeForm.get('startDate')?.value && this.dateRangeForm.get('endDate')?.value\"\n ></i-tech-icon-button>\n <i-tech-icon-button\n matSuffix\n [iconName]=\"'date_range'\"\n (buttonClick)=\"picker.open()\"\n class=\"default-form-icon-color\"\n ></i-tech-icon-button>\n <mat-date-range-picker\n [panelClass]=\"panelClass\"\n #picker\n (closed)=\"onPickerClosed()\"\n (opened)=\"onPickerOpened()\"\n >\n <mat-datepicker-actions *ngIf=\"presetActions?.length\">\n <div class=\"preset-actions-container\">\n <i-tech-label *ngFor=\"let action of presetActions\"\n class=\"w-100\"\n [customChipClass]=\"'w-100'\"\n [text]=\"action.translateKey || action.label\"\n [color]=\"action.label === activePreset ? LabelTypeEnum.primary : LabelTypeEnum.white\"\n [bordered]=\"true\"\n [matChipAction]=\"true\"\n [disableRipple]=\"false\"\n (click)=\"onPresetAction(action)\">\n </i-tech-label>\n <button matDateRangePickerApply class=\"hidden-apply-btn\" style=\"display: none\"></button>\n </div>\n </mat-datepicker-actions>\n </mat-date-range-picker>\n <mat-hint *ngIf=\"hintText && !errorMessage\">{{ hintText }}</mat-hint>\n </mat-form-field>\n</div>\n", styles: [".preset-actions-container{display:flex;flex-direction:column;gap:8px;padding:0 0 24px;width:100%}::ng-deep .mdc-text-field--outlined{padding-left:8px!important}::ng-deep .mat-date-range-input-separator{margin:0!important}::ng-deep .mat-mdc-form-field-icon-suffix{padding-left:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i3$1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3$1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i3$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i3$1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i3$1.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "component", type: IconButtonComponent, selector: "i-tech-icon-button", inputs: ["size", "type", "borderColor", "iconSvg", "iconName", "tooltip", "disabled", "testId", "fillColor"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: LabelComponent, selector: "i-tech-label", inputs: ["color", "text", "innerHtml", "bordered", "tooltip", "size", "iconName", "iconSvg", "disableRipple", "matChipAction", "forTable", "iconConfig", "customChipClass", "customBgColor", "customTextColor"] }] }); }
|
|
1662
1657
|
}
|
|
1663
1658
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DateRangeDatepickerComponent, decorators: [{
|
|
1664
1659
|
type: Component,
|
|
@@ -1668,10 +1663,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1668
1663
|
MatDatepickerModule,
|
|
1669
1664
|
NgClass, NgIf, NgForOf,
|
|
1670
1665
|
TranslateModule,
|
|
1671
|
-
IconButtonComponent,
|
|
1666
|
+
IconButtonComponent,
|
|
1672
1667
|
MatButtonModule,
|
|
1673
1668
|
LabelComponent
|
|
1674
|
-
], standalone: true, template: "<div class=\"flex_column relative mat-date-range-input\"\n [formGroup]=\"dateRangeForm\"\n>\n <div class=\"w-100\" *ngIf=\"label\">\n <mat-label>\n {{ (label || '') | translate }}\n </mat-label>\n </div>\n <mat-form-field appearance=\"outline\" [ngClass]=\"{'opened_calendar': isOpen}\">\n <mat-date-range-input [rangePicker]=\"picker\"\n\n >\n <input formControlName=\"startDate\"\n [attr.data-testId]=\"'date-range-' + testId + '-min-date'\"\n [placeholder]=\" (placeholder ? placeholder[0] : 'Start Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-accessKey]=\"key ? key.start : 'minStartDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matStartDate #min\n
|
|
1669
|
+
], standalone: true, template: "<div class=\"flex_column relative mat-date-range-input\"\n [formGroup]=\"dateRangeForm\"\n>\n <div class=\"w-100\" *ngIf=\"label\">\n <mat-label>\n {{ (label || '') | translate }}\n </mat-label>\n </div>\n <mat-form-field appearance=\"outline\" [ngClass]=\"{'opened_calendar': isOpen}\">\n <mat-date-range-input [rangePicker]=\"picker\"\n\n >\n <input formControlName=\"startDate\"\n [attr.data-testId]=\"'date-range-' + testId + '-min-date'\"\n [placeholder]=\" (placeholder ? placeholder[0] : 'Start Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-accessKey]=\"key ? key.start : 'minStartDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matStartDate #min\n readonly\n [errorStateMatcher]=\"customErrorStateMatcher\"\n (dateChange)=\"setDate([min.value, max.value || null],min)\">\n <input formControlName=\"endDate\"\n [placeholder]=\"(placeholder ? placeholder[1] : 'End Date')\"\n [title]=\"key ? key.title : 'Date'\"\n [attr.data-testId]=\"'date-range-' + testId + '-end-date'\"\n [attr.data-accessKey]=\"key ? key.end : 'maxEndDate'\"\n [attr.data-parentKey]=\"key ? (key.start + '_' + key.end) : 'minStartDate_maxEndDate'\"\n matEndDate #max\n readonly\n [errorStateMatcher]=\"customErrorStateMatcher\"\n (dateChange)=\"setDate([min.value, max.value || null],max)\">\n </mat-date-range-input>\n <i-tech-icon-button matSuffix\n [iconName]=\"'cancel'\"\n (buttonClick)=\"setDate([null,null], max)\"\n class=\"default-form-icon-color\"\n *ngIf=\"dateRangeForm.get('startDate')?.value && this.dateRangeForm.get('endDate')?.value\"\n ></i-tech-icon-button>\n <i-tech-icon-button\n matSuffix\n [iconName]=\"'date_range'\"\n (buttonClick)=\"picker.open()\"\n class=\"default-form-icon-color\"\n ></i-tech-icon-button>\n <mat-date-range-picker\n [panelClass]=\"panelClass\"\n #picker\n (closed)=\"onPickerClosed()\"\n (opened)=\"onPickerOpened()\"\n >\n <mat-datepicker-actions *ngIf=\"presetActions?.length\">\n <div class=\"preset-actions-container\">\n <i-tech-label *ngFor=\"let action of presetActions\"\n class=\"w-100\"\n [customChipClass]=\"'w-100'\"\n [text]=\"action.translateKey || action.label\"\n [color]=\"action.label === activePreset ? LabelTypeEnum.primary : LabelTypeEnum.white\"\n [bordered]=\"true\"\n [matChipAction]=\"true\"\n [disableRipple]=\"false\"\n (click)=\"onPresetAction(action)\">\n </i-tech-label>\n <button matDateRangePickerApply class=\"hidden-apply-btn\" style=\"display: none\"></button>\n </div>\n </mat-datepicker-actions>\n </mat-date-range-picker>\n <mat-hint *ngIf=\"hintText && !errorMessage\">{{ hintText }}</mat-hint>\n </mat-form-field>\n</div>\n", styles: [".preset-actions-container{display:flex;flex-direction:column;gap:8px;padding:0 0 24px;width:100%}::ng-deep .mdc-text-field--outlined{padding-left:8px!important}::ng-deep .mat-date-range-input-separator{margin:0!important}::ng-deep .mat-mdc-form-field-icon-suffix{padding-left:0!important}\n"] }]
|
|
1675
1670
|
}], propDecorators: { label: [{
|
|
1676
1671
|
type: Input
|
|
1677
1672
|
}], placeholder: [{
|