@brggroup/share-lib 0.0.16 → 0.0.18

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.
@@ -30,6 +30,7 @@ import * as i5 from 'ng-zorro-antd/form';
30
30
  import { NzFormModule } from 'ng-zorro-antd/form';
31
31
  import * as i5$1 from 'ng-zorro-antd/date-picker';
32
32
  import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
33
+ import { startOfWeek, subWeeks, endOfWeek, startOfMonth, endOfMonth, subMonths } from 'date-fns';
33
34
  import * as i6 from 'ng-zorro-antd/input-number';
34
35
  import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
35
36
  import * as i6$1 from 'ng-zorro-antd/input';
@@ -623,9 +624,6 @@ function authInterceptor(req, next) {
623
624
  const translate = inject(TranslateService);
624
625
  const authToken = TokenStorage.getToken();
625
626
  const noLoadingMark = req.headers.get('No-Loading-Mark');
626
- console.log(`noLoadingMark`);
627
- console.log(noLoadingMark);
628
- console.log(noLoadingMark != '1');
629
627
  if (noLoadingMark != '1') {
630
628
  loadingService.loadingUp();
631
629
  }
@@ -1627,6 +1625,8 @@ class ExtendDatePicker {
1627
1625
  borderBottomOnly = false;
1628
1626
  displayInline = false;
1629
1627
  size = 'default';
1628
+ minDate;
1629
+ maxDate;
1630
1630
  lstItem = [];
1631
1631
  displayField = '';
1632
1632
  valueField = '';
@@ -1655,8 +1655,53 @@ class ExtendDatePicker {
1655
1655
  this.onTouched();
1656
1656
  this._ngModelChange.emit(val);
1657
1657
  }
1658
+ disabledDate = (current) => {
1659
+ if (!current)
1660
+ return false;
1661
+ const min = this.minDate ? new Date(this.minDate) : null;
1662
+ const max = this.maxDate ? new Date(this.maxDate) : null;
1663
+ if (min && current < new Date(min.setHours(0, 0, 0, 0)))
1664
+ return true;
1665
+ if (max && current > new Date(max.setHours(23, 59, 59, 999)))
1666
+ return true;
1667
+ return false;
1668
+ };
1669
+ get errorMessage() {
1670
+ const value = this._ngModel ? new Date(this._ngModel) : null;
1671
+ if (!this.isTouched && !value) {
1672
+ return '';
1673
+ }
1674
+ if (this.required && !value) {
1675
+ return 'Trường yêu cầu nhập';
1676
+ }
1677
+ if (this.minDate && value && new Date(value) < new Date(this.minDate)) {
1678
+ return `Ngày không được nhỏ hơn ${this.formatDate(this.minDate)}`;
1679
+ }
1680
+ if (this.maxDate && value && new Date(value) > new Date(this.maxDate)) {
1681
+ return `Ngày không được lớn hơn ${this.formatDate(this.maxDate)}`;
1682
+ }
1683
+ return '';
1684
+ }
1685
+ formatDate(date) {
1686
+ const d = new Date(date);
1687
+ const day = String(d.getDate()).padStart(2, '0');
1688
+ const month = String(d.getMonth() + 1).padStart(2, '0');
1689
+ const year = d.getFullYear();
1690
+ switch (this.dateFormat) {
1691
+ case 'dd/MM/yyyy':
1692
+ return `${day}/${month}/${year}`;
1693
+ case 'MM/dd/yyyy':
1694
+ return `${month}/${day}/${year}`;
1695
+ default:
1696
+ return d.toLocaleDateString();
1697
+ }
1698
+ }
1699
+ isTouched = false;
1700
+ onBlur() {
1701
+ this.isTouched = true;
1702
+ }
1658
1703
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
1659
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendDatePicker, isStandalone: true, selector: "extend-date-picker", inputs: { dateFormat: "dateFormat", layOutType: "layOutType", label: "label", placeHolder: "placeHolder", labelAlign: "labelAlign", labelSpan: "labelSpan", inputSpan: "inputSpan", disabled: "disabled", required: "required", noBottom: "noBottom", selectModeType: "selectModeType", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", size: "size", lstItem: "lstItem", displayField: "displayField", valueField: "valueField", formData: "formData", controlName: "controlName", _ngModel: "_ngModel" }, outputs: { _ngModelChange: "_ngModelChange" }, ngImport: i0, template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [disabled]=\"disabled\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-date-picker\n class=\"full-width\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "directive", type: DateInputParserDirective, selector: "nz-date-picker", inputs: ["format"] }] });
1704
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendDatePicker, isStandalone: true, selector: "extend-date-picker", inputs: { dateFormat: "dateFormat", layOutType: "layOutType", label: "label", placeHolder: "placeHolder", labelAlign: "labelAlign", labelSpan: "labelSpan", inputSpan: "inputSpan", disabled: "disabled", required: "required", noBottom: "noBottom", selectModeType: "selectModeType", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", size: "size", minDate: "minDate", maxDate: "maxDate", lstItem: "lstItem", displayField: "displayField", valueField: "valueField", formData: "formData", controlName: "controlName", _ngModel: "_ngModel" }, outputs: { _ngModelChange: "_ngModelChange" }, ngImport: i0, template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"errorMessage\"\n [nzValidateStatus]=\"errorMessage ? 'error' : ''\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [disabled]=\"disabled\"\n [nzDisabledDate]=\"disabledDate\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n (blur)=\"onBlur()\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-date-picker\n class=\"full-width\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "directive", type: DateInputParserDirective, selector: "nz-date-picker", inputs: ["format"] }] });
1660
1705
  }
1661
1706
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendDatePicker, decorators: [{
1662
1707
  type: Component,
@@ -1668,7 +1713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
1668
1713
  NzDatePickerModule,
1669
1714
  TranslateModule,
1670
1715
  DateInputParserDirective,
1671
- ], template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [disabled]=\"disabled\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-date-picker\n class=\"full-width\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n }\n }\n</div>\n" }]
1716
+ ], template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div>\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"errorMessage\"\n [nzValidateStatus]=\"errorMessage ? 'error' : ''\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [disabled]=\"disabled\"\n [nzDisabledDate]=\"disabledDate\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n (blur)=\"onBlur()\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n } @else {\n <nz-date-picker\n class=\"full-width\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n [nzSize]=\"size\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [disabled]=\"disabled\"\n [(ngModel)]=\"_ngModel\"\n (ngModelChange)=\"onNgModelChange($event)\"\n ></nz-date-picker>\n }\n }\n</div>\n" }]
1672
1717
  }], propDecorators: { dateFormat: [{
1673
1718
  type: Input
1674
1719
  }], layOutType: [{
@@ -1701,6 +1746,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
1701
1746
  type: Input
1702
1747
  }], size: [{
1703
1748
  type: Input
1749
+ }], minDate: [{
1750
+ type: Input
1751
+ }], maxDate: [{
1752
+ type: Input
1704
1753
  }], lstItem: [{
1705
1754
  type: Input
1706
1755
  }], displayField: [{
@@ -1717,6 +1766,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
1717
1766
  type: Output
1718
1767
  }] } });
1719
1768
 
1769
+ class ExtendDateRangePicker {
1770
+ dateFormat = 'dd/MM/yyyy';
1771
+ layOutType = 'horizontal';
1772
+ label = '';
1773
+ placeHolder = '';
1774
+ labelAlign = 'left';
1775
+ labelSpan = 8;
1776
+ inputSpan = 16;
1777
+ disabled = false;
1778
+ required = false;
1779
+ noBottom = false;
1780
+ selectModeType = 'default';
1781
+ inputWidth = '';
1782
+ inputHeight = '';
1783
+ borderBottomOnly = false;
1784
+ displayInline = false;
1785
+ size = 'default';
1786
+ lstItem = [];
1787
+ displayField = '';
1788
+ valueField = '';
1789
+ formData;
1790
+ controlName;
1791
+ date1 = null;
1792
+ date1Change = new EventEmitter();
1793
+ date2 = null;
1794
+ date2Change = new EventEmitter();
1795
+ _ngModel;
1796
+ today = new Date();
1797
+ ranges = {
1798
+ 'Tuần trước': [
1799
+ startOfWeek(subWeeks(this.today, 1), { weekStartsOn: 1 }),
1800
+ endOfWeek(subWeeks(this.today, 1), { weekStartsOn: 1 }),
1801
+ ],
1802
+ 'Tuần này': [startOfWeek(this.today, { weekStartsOn: 1 }), endOfWeek(this.today, { weekStartsOn: 1 })],
1803
+ 'Tháng này': [startOfMonth(this.today), endOfMonth(this.today)],
1804
+ 'Tháng trước': [startOfMonth(subMonths(this.today, 1)), endOfMonth(subMonths(this.today, 1))],
1805
+ };
1806
+ ngOnInit() {
1807
+ this._ngModel = this.date1 && this.date2 ? [this.date1, this.date2] : undefined;
1808
+ }
1809
+ ngModelChange(value) {
1810
+ this._ngModel = value;
1811
+ if (value && value.length === 2) {
1812
+ this.date1 = value[0];
1813
+ this.date2 = value[1];
1814
+ }
1815
+ else {
1816
+ this.date1 = null;
1817
+ this.date2 = null;
1818
+ }
1819
+ this.date1Change.emit(this.date1);
1820
+ this.date2Change.emit(this.date2);
1821
+ }
1822
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendDateRangePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
1823
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ExtendDateRangePicker, isStandalone: true, selector: "extend-date-range-picker", inputs: { dateFormat: "dateFormat", layOutType: "layOutType", label: "label", placeHolder: "placeHolder", labelAlign: "labelAlign", labelSpan: "labelSpan", inputSpan: "inputSpan", disabled: "disabled", required: "required", noBottom: "noBottom", selectModeType: "selectModeType", inputWidth: "inputWidth", inputHeight: "inputHeight", borderBottomOnly: "borderBottomOnly", displayInline: "displayInline", size: "size", lstItem: "lstItem", displayField: "displayField", valueField: "valueField", formData: "formData", controlName: "controlName", date1: "date1", date2: "date2" }, outputs: { date1Change: "date1Change", date2Change: "date2Change" }, ngImport: i0, template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <!-- <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div> -->\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-range-picker\n [nzSize]=\"size\"\n [nzFormat]=\"dateFormat\"\n [nzPlaceHolder]=\"['T\u1EEB ng\u00E0y', '\u0111\u1EBFn ng\u00E0y']\"\n [nzRanges]=\"ranges\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"ngModelChange($event)\"\n ></nz-range-picker>\n </nz-form-item>\n } @else {\n <nz-range-picker\n [nzSize]=\"size\"\n [nzFormat]=\"dateFormat\"\n [nzPlaceHolder]=\"['T\u1EEB ng\u00E0y', '\u0111\u1EBFn ng\u00E0y']\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"ngModelChange($event)\"\n ></nz-range-picker>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i5$1.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5$1.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "ngmodule", type: TranslateModule }] });
1824
+ }
1825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendDateRangePicker, decorators: [{
1826
+ type: Component,
1827
+ args: [{ selector: 'extend-date-range-picker', imports: [CommonModule, FormsModule, ReactiveFormsModule, NzFormModule, NzDatePickerModule, TranslateModule], template: "<div class=\"extend-wrapper\" [ngStyle]=\"{ display: displayInline ? 'inline' : null }\">\n @if (controlName) {\n <!-- <div [formGroup]=\"formData\">\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-form-control\n [nzSpan]=\"layOutType == 'horizontal' ? inputSpan : null\"\n [ngClass]=\"{ 'full-width': layOutType == 'vertical' }\"\n [nzErrorTip]=\"'REQUIRED_FIELD' | translate\"\n >\n <nz-date-picker\n class=\"full-width\"\n [nzPlaceHolder]=\"placeHolder || ' '\"\n [nzFormat]=\"dateFormat\"\n [nzSize]=\"size\"\n [formControlName]=\"controlName\"\n [ngStyle]=\"{\n width: inputWidth,\n height: inputHeight,\n }\"\n [ngClass]=\"{\n 'border-bottom-only': borderBottomOnly,\n }\"\n ></nz-date-picker>\n </nz-form-control>\n </nz-form-item>\n </div> -->\n } @else {\n @if (label) {\n <nz-form-item>\n <nz-form-label\n [nzSpan]=\"layOutType == 'horizontal' ? labelSpan : null\"\n [nzLabelAlign]=\"labelAlign\"\n [nzRequired]=\"required\"\n [nzFor]=\"controlName\"\n nzNoColon\n nzLabelWrap\n >\n {{ label }}\n </nz-form-label>\n <nz-range-picker\n [nzSize]=\"size\"\n [nzFormat]=\"dateFormat\"\n [nzPlaceHolder]=\"['T\u1EEB ng\u00E0y', '\u0111\u1EBFn ng\u00E0y']\"\n [nzRanges]=\"ranges\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"ngModelChange($event)\"\n ></nz-range-picker>\n </nz-form-item>\n } @else {\n <nz-range-picker\n [nzSize]=\"size\"\n [nzFormat]=\"dateFormat\"\n [nzPlaceHolder]=\"['T\u1EEB ng\u00E0y', '\u0111\u1EBFn ng\u00E0y']\"\n [ngModel]=\"_ngModel\"\n (ngModelChange)=\"ngModelChange($event)\"\n ></nz-range-picker>\n }\n }\n</div>\n" }]
1828
+ }], propDecorators: { dateFormat: [{
1829
+ type: Input
1830
+ }], layOutType: [{
1831
+ type: Input
1832
+ }], label: [{
1833
+ type: Input
1834
+ }], placeHolder: [{
1835
+ type: Input
1836
+ }], labelAlign: [{
1837
+ type: Input
1838
+ }], labelSpan: [{
1839
+ type: Input
1840
+ }], inputSpan: [{
1841
+ type: Input
1842
+ }], disabled: [{
1843
+ type: Input
1844
+ }], required: [{
1845
+ type: Input
1846
+ }], noBottom: [{
1847
+ type: Input
1848
+ }], selectModeType: [{
1849
+ type: Input
1850
+ }], inputWidth: [{
1851
+ type: Input
1852
+ }], inputHeight: [{
1853
+ type: Input
1854
+ }], borderBottomOnly: [{
1855
+ type: Input
1856
+ }], displayInline: [{
1857
+ type: Input
1858
+ }], size: [{
1859
+ type: Input
1860
+ }], lstItem: [{
1861
+ type: Input
1862
+ }], displayField: [{
1863
+ type: Input
1864
+ }], valueField: [{
1865
+ type: Input
1866
+ }], formData: [{
1867
+ type: Input
1868
+ }], controlName: [{
1869
+ type: Input
1870
+ }], date1: [{
1871
+ type: Input
1872
+ }], date1Change: [{
1873
+ type: Output
1874
+ }], date2: [{
1875
+ type: Input
1876
+ }], date2Change: [{
1877
+ type: Output
1878
+ }] } });
1879
+
1720
1880
  class ExtendInputNumber {
1721
1881
  layOutType = 'horizontal'; // horizontal: ngang, vertical dọc
1722
1882
  label = '';
@@ -2993,5 +3153,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
2993
3153
  * Generated bundle index. Do not edit.
2994
3154
  */
2995
3155
 
2996
- export { AnimatedDigitComponent, AppGlobals, AppStorage, AuthGuard, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExtendCheckbox, ExtendDatePicker, ExtendInput, ExtendInputNumber, ExtendSelectComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, HTTPService, Height, LimitWordsPipe, LineGraphComponent, LoadingService, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, PagingData, PagingModel, PdfViewerComponent, RouteMonitorService, TableHeader, ThemeService, TokenStorage, TranslateKey, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, Width, XLSXHelper, authInterceptor };
3156
+ export { AnimatedDigitComponent, AppGlobals, AppStorage, AuthGuard, AutoFocusDirective, BarGraphComponent, BaseComponent, BaseGuardChangeComponent, BaseOverlayComponent, Box, Breadcrumb, CheckModel, CommonService, DashcardComponent, DateInputParserDirective, DateTimeHelper, DoughnutGraphComponent, DownloadHelper, ENUM_ResponseType, ExtendCheckbox, ExtendDatePicker, ExtendDateRangePicker, ExtendInput, ExtendInputNumber, ExtendSelectComponent, ExtendTextArea, GlobalSpinnerComponent, GridFilter, HTTPService, Height, LimitWordsPipe, LineGraphComponent, LoadingService, NoPermission, NotiService, NullIfEmptyDirective, NumberOnlyDirective, OrderOption, PagingData, PagingModel, PdfViewerComponent, RouteMonitorService, TableHeader, ThemeService, TokenStorage, TranslateKey, UnsavedChangesGuard, UpperCaseFirsLetterEachWordDirective, UppercaseDirective, UppercaseFirstLetterDirective, VscService, Width, XLSXHelper, authInterceptor };
2997
3157
  //# sourceMappingURL=brggroup-share-lib.mjs.map