cmat 0.0.94 → 0.0.96

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.
@@ -427,7 +427,7 @@ class CmatDateRangeComponent {
427
427
  useExisting: forwardRef(() => CmatDateRangeComponent),
428
428
  multi: true,
429
429
  },
430
- ], viewQueries: [{ propertyName: "_matMonthView1", first: true, predicate: ["matMonthView1"], descendants: true, isSignal: true }, { propertyName: "_matMonthView2", first: true, predicate: ["matMonthView2"], descendants: true, isSignal: true }, { propertyName: "_pickerPanelOrigin", first: true, predicate: ["pickerPanelOrigin"], descendants: true, isSignal: true }, { propertyName: "_pickerPanel", first: true, predicate: ["pickerPanel"], descendants: true, isSignal: true }], exportAs: ["cmatDateRange"], ngImport: i0, template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: MatMonthView, selector: "mat-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName", "activeDrag"], outputs: ["selectedChange", "_userSelection", "dragStarted", "dragEnded", "activeDateChange"], exportAs: ["matMonthView"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
430
+ ], viewQueries: [{ propertyName: "_matMonthView1", first: true, predicate: ["matMonthView1"], descendants: true, isSignal: true }, { propertyName: "_matMonthView2", first: true, predicate: ["matMonthView2"], descendants: true, isSignal: true }, { propertyName: "_pickerPanelOrigin", first: true, predicate: ["pickerPanelOrigin"], descendants: true, isSignal: true }, { propertyName: "_pickerPanel", first: true, predicate: ["pickerPanel"], descendants: true, isSignal: true }], exportAs: ["cmatDateRange"], ngImport: i0, template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:12px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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: "component", type: MatMonthView, selector: "mat-month-view", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName", "activeDrag"], outputs: ["selectedChange", "_userSelection", "dragStarted", "dragEnded", "activeDateChange"], exportAs: ["matMonthView"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
431
431
  }
432
432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CmatDateRangeComponent, decorators: [{
433
433
  type: Component,
@@ -446,7 +446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
446
446
  MatMonthView,
447
447
  MatInputModule,
448
448
  NgClass,
449
- ], template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:4px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"] }]
449
+ ], template: "<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>\u5F00\u59CB\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>\u7ED3\u675F\u65F6\u95F4</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>", styles: ["cmat-date-range{display:flex}cmat-date-range .range{display:flex;width:100%;align-items:center;height:48px;min-height:48px;max-height:48px;cursor:pointer}cmat-date-range .range .start,cmat-date-range .range .end{display:flex;align-items:center;height:100%;padding:0 16px;border-radius:6px;border-width:1px;line-height:1}cmat-date-range .range .date{white-space:nowrap}cmat-date-range .range .date+.time{margin-left:8px}cmat-date-range .range .time{white-space:nowrap}cmat-date-range .separator{margin:0 8px;width:6px}.cmat-date-range-panel{border-radius:12px;padding:24px}.cmat-date-range-panel .start,.cmat-date-range-panel .end{display:flex;flex-direction:column}.cmat-date-range-panel .start .month,.cmat-date-range-panel .end .month{max-width:196px;min-width:196px;width:196px}.cmat-date-range-panel .start .month .month-header,.cmat-date-range-panel .end .month .month-header{position:relative;display:flex;align-items:center;justify-content:center;height:32px;margin-bottom:16px}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .next-button{position:absolute;width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important}.cmat-date-range-panel .start .month .month-header .previous-button,.cmat-date-range-panel .end .month .month-header .previous-button{left:0}.cmat-date-range-panel .start .month .month-header .next-button,.cmat-date-range-panel .end .month .month-header .next-button{right:0}.cmat-date-range-panel .start .month .month-header .month-label,.cmat-date-range-panel .end .month .month-header .month-label{font-weight:500}.cmat-date-range-panel .start .month mat-month-view,.cmat-date-range-panel .end .month mat-month-view{display:flex;min-height:188px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table{width:100%;border-collapse:collapse}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr[aria-hidden=true]{display:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true],.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr:first-child td:first-child[aria-hidden=true]{visibility:hidden;pointer-events:none;opacity:0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody tr td .mat-calendar-body-cell-content{background-color:transparent!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-today{border:none!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell{width:28px!important;height:28px!important;padding:2px!important}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range:before{content:\"\";position:absolute;inset:2px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start:before{border-radius:999px 0 0 999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-start.cmat-date-range-end:before{right:2px;border-radius:999px}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell.cmat-date-range.cmat-date-range-end:before{border-radius:0 999px 999px 0}.cmat-date-range-panel .start .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content,.cmat-date-range-panel .end .month mat-month-view .mat-calendar-table tbody .mat-calendar-body-cell .mat-calendar-body-cell-content{position:relative;top:0;left:0;width:24px;height:24px;font-size:12px}.cmat-date-range-panel .time{width:100%;max-width:196px}.cmat-date-range-panel .start{align-items:flex-start;margin-right:20px}.cmat-date-range-panel .start .month .month-label{margin-left:8px}.cmat-date-range-panel .end{align-items:flex-end;margin-left:20px}.cmat-date-range-panel .end .month .month-label{margin-right:8px}\n"] }]
450
450
  }], ctorParameters: () => [], propDecorators: { controlClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlClass", required: false }] }], dateFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormat", required: false }] }], timeFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormat", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], timeRange: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeRange", required: false }] }], range: [{ type: i0.Input, args: [{ isSignal: true, alias: "range", required: false }] }], rangeChanged: [{ type: i0.Output, args: ["rangeChanged"] }], _matMonthView1: [{ type: i0.ViewChild, args: ['matMonthView1', { isSignal: true }] }], _matMonthView2: [{ type: i0.ViewChild, args: ['matMonthView2', { isSignal: true }] }], _pickerPanelOrigin: [{ type: i0.ViewChild, args: ['pickerPanelOrigin', { isSignal: true }] }], _pickerPanel: [{ type: i0.ViewChild, args: ['pickerPanel', { isSignal: true }] }] } });
451
451
 
452
452
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-date-range.mjs","sources":["../../../projects/cmat/components/date-range/date-range.component.ts","../../../projects/cmat/components/date-range/date-range.component.html","../../../projects/cmat/components/date-range/cmat-components-date-range.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n input,\r\n OnDestroy,\r\n OnInit,\r\n output,\r\n signal,\r\n TemplateRef,\r\n untracked,\r\n viewChild,\r\n ViewContainerRef,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormControl,\r\n NG_VALUE_ACCESSOR,\r\n Validators,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n} from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {\r\n MatCalendarCellCssClasses,\r\n MatMonthView,\r\n} from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\n\r\nexport interface DateRangeInputValue {\r\n start: string;\r\n end: string;\r\n whichDate?: 'start' | 'end' | '';\r\n}\r\n\r\nexport interface DateRangeOutputValue {\r\n start: string | null;\r\n end: string | null;\r\n}\r\n\r\nexport interface DateRangeDisplayValue {\r\n startDate: string | null;\r\n startTime: string | null;\r\n endDate: string | null;\r\n endTime: string | null;\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-date-range',\r\n templateUrl: './date-range.component.html',\r\n styleUrls: ['./date-range.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDateRange',\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDateRangeComponent),\r\n multi: true,\r\n },\r\n ],\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatFormFieldModule,\r\n MatMonthView,\r\n MatInputModule,\r\n NgClass,\r\n ],\r\n})\r\nexport class CmatDateRangeComponent\r\n implements ControlValueAccessor, OnInit, OnDestroy {\r\n readonly controlClass = input<string>('');\r\n readonly dateFormat = input<string>('YYYY/MM/DD');\r\n readonly timeFormat = input<string, string>('HH:mm', {\r\n transform: (value: string) => value === '12' ? 'hh:mmA' : 'HH:mm',\r\n });\r\n readonly readonly = input<boolean>(false);\r\n readonly timeRange = input<boolean>(true);\r\n readonly range = input<DateRangeInputValue | null>(null);\r\n readonly rangeChanged = output<{ start: string; end: string }>();\r\n\r\n readonly activeDates = signal<{ month1: Dayjs; month2: Dayjs }>({\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month'),\r\n });\r\n readonly setWhichDate = signal<'start' | 'end'>('start');\r\n startTimeFormControl: FormControl;\r\n endTimeFormControl: FormControl;\r\n\r\n readonly rangeDisplay = computed<DateRangeDisplayValue | undefined>(() => {\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n const start = r.start.clone();\r\n const end = r.end.clone();\r\n return {\r\n startDate: start.format(this.dateFormat()),\r\n startTime: this.timeRange() ? start.format(this.timeFormat()) : null,\r\n endDate: end.format(this.dateFormat()),\r\n endTime: this.timeRange() ? end.format(this.timeFormat()) : null,\r\n };\r\n }\r\n return undefined;\r\n });\r\n\r\n readonly dateClassFn = computed<(date: Dayjs) => MatCalendarCellCssClasses>(() => {\r\n const r = this._range();\r\n return (date: Dayjs): MatCalendarCellCssClasses => {\r\n if (r.start && r.end) {\r\n if (date.isSame(r.start, 'day') && date.isSame(r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];\r\n }\r\n if (date.isSame(r.start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n if (date.isSame(r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n if (date.isBetween(r.start, r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-mid'];\r\n }\r\n } else if (r.start && date.isSame(r.start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n return [];\r\n };\r\n });\r\n\r\n readonly dateFilterFn = computed<(date: Dayjs) => boolean>(() => {\r\n const which = this.setWhichDate();\r\n const r = this._range();\r\n return (date: Dayjs): boolean => {\r\n return !(which === 'end' && r.start && date.isBefore(r.start, 'day'));\r\n };\r\n });\r\n\r\n private readonly _matMonthView1 = viewChild<MatMonthView<Dayjs>>('matMonthView1');\r\n private readonly _matMonthView2 = viewChild<MatMonthView<Dayjs>>('matMonthView2');\r\n private readonly _pickerPanelOrigin = viewChild<ElementRef<HTMLElement>>('pickerPanelOrigin');\r\n private readonly _pickerPanel = viewChild<TemplateRef<unknown>>('pickerPanel');\r\n\r\n private readonly _overlay = inject(Overlay);\r\n private readonly _viewContainerRef = inject(ViewContainerRef);\r\n private _overlayRef: OverlayRef | null = null;\r\n\r\n private readonly _range = signal<{ start: Dayjs | null; end: Dayjs | null }>({\r\n start: null,\r\n end: null,\r\n });\r\n\r\n private _programmaticChange = false;\r\n private _rangeInputFirstRun = true;\r\n private _timeRangeFirstRun = true;\r\n private _emittingChange = false;\r\n private readonly _timeRegExp: RegExp = new RegExp(\r\n '^(0[0-9]|1[0-9]|2[0-4]|[0-9]):([0-5][0-9])(A|(?:AM)|P|(?:PM))?$',\r\n 'i',\r\n );\r\n\r\n constructor() {\r\n dayjs.extend(isBetween);\r\n\r\n effect(() => {\r\n const rangeValue = this.range();\r\n\r\n if (this._rangeInputFirstRun) {\r\n this._rangeInputFirstRun = false;\r\n return;\r\n }\r\n\r\n untracked(() => {\r\n this._setRangeFromInput(rangeValue);\r\n });\r\n });\r\n\r\n effect(() => {\r\n const tr = this.timeRange();\r\n if (this._timeRangeFirstRun) {\r\n this._timeRangeFirstRun = false;\r\n return;\r\n }\r\n\r\n untracked(() => {\r\n if (!tr && this._range().start && this._range().end) {\r\n this._setRangeFromInput({\r\n start: this._range().start!.clone().startOf('day').toISOString(),\r\n end: this._range().end!.clone().endOf('day').toISOString(),\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n registerOnChange(fn: (value: DateRangeOutputValue) => void): void {\r\n this._onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n writeValue(range: DateRangeInputValue | null): void {\r\n this._programmaticChange = true;\r\n this._setRangeFromInput(range);\r\n }\r\n\r\n ngOnInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._overlayRef) {\r\n this._overlayRef.dispose();\r\n this._overlayRef = null;\r\n }\r\n }\r\n\r\n openPickerPanel(): void {\r\n if (this.readonly()) return;\r\n const origin = this._pickerPanelOrigin();\r\n if (!origin) return;\r\n\r\n const overlayRef = this._overlay.create({\r\n panelClass: 'cmat-date-range-panel',\r\n backdropClass: '',\r\n hasBackdrop: true,\r\n scrollStrategy: this._overlay.scrollStrategies.reposition(),\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(origin)\r\n .withPositions([\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n },\r\n ]),\r\n });\r\n\r\n this._overlayRef = overlayRef;\r\n const templatePortal = new TemplatePortal(\r\n this._pickerPanel()!,\r\n this._viewContainerRef,\r\n );\r\n\r\n overlayRef.backdropClick().subscribe((): void => {\r\n if (templatePortal?.isAttached) {\r\n templatePortal.detach();\r\n }\r\n if (overlayRef?.hasAttached()) {\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n this._overlayRef = null;\r\n });\r\n\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n getMonthLabel(month: number): string {\r\n const dates = this.activeDates();\r\n if (month === 1) {\r\n return dates.month1?.clone().format('YYYY MMMM') ?? '';\r\n }\r\n return dates.month2?.clone().format('YYYY MMMM') ?? '';\r\n }\r\n\r\n onActiveDateChange(month: number, date: Dayjs): void {\r\n this.activeDates.update((dates) => {\r\n if (month === 1) {\r\n return { month1: date, month2: dates.month2 };\r\n }\r\n return { month1: dates.month1, month2: date };\r\n });\r\n }\r\n\r\n onSelectedDateChange(date: Dayjs | null): void {\r\n if (!date) return;\r\n const whichDate = this.setWhichDate();\r\n const r = this._range();\r\n const newRange: DateRangeInputValue = {\r\n start: (whichDate === 'start'\r\n ? (r.start ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())\r\n : r.start ?? date\r\n ).toISOString(),\r\n end: (whichDate === 'end'\r\n ? (r.end ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())\r\n : r.end ?? date\r\n ).toISOString(),\r\n whichDate,\r\n };\r\n this.setWhichDate.set(whichDate === 'start' ? 'end' : 'start');\r\n this._setRangeFromInput(newRange);\r\n }\r\n\r\n prev(): void {\r\n this.activeDates.update(dates => ({\r\n month1: dayjs(dates.month1).subtract(1, 'month'),\r\n month2: dayjs(dates.month2).subtract(1, 'month'),\r\n }));\r\n }\r\n\r\n next(): void {\r\n this.activeDates.update(dates => ({\r\n month1: dayjs(dates.month1).add(1, 'month'),\r\n month2: dayjs(dates.month2).add(1, 'month'),\r\n }));\r\n }\r\n\r\n updateStartTime(event: Event): void {\r\n const input = event.target as HTMLInputElement | null;\r\n const value = input?.value ?? '';\r\n const parsedTime = this._parseTime(value);\r\n const formControl = this.startTimeFormControl;\r\n\r\n if (formControl?.invalid) {\r\n const r = this._range();\r\n if (r.start) {\r\n formControl.setValue(r.start.clone().format(this.timeFormat()));\r\n }\r\n return;\r\n }\r\n\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n let startDate = r.start\r\n .clone()\r\n .hour(parsedTime.hour())\r\n .minute(parsedTime.minute());\r\n if (startDate.isAfter(r.end)) {\r\n const endDateHours = r.end.hour();\r\n const endDateMinutes = r.end.minute();\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n this._setRangeFromInput({\r\n start: startDate.toISOString(),\r\n end: r.end.clone().toISOString(),\r\n whichDate: 'start',\r\n });\r\n }\r\n }\r\n\r\n updateEndTime(event: Event): void {\r\n const input = event.target as HTMLInputElement | null;\r\n const value = input?.value ?? '';\r\n const parsedTime = this._parseTime(value);\r\n const formControl = this.endTimeFormControl;\r\n\r\n if (formControl?.invalid) {\r\n const r = this._range();\r\n if (r.end) {\r\n formControl.setValue(r.end.clone().format(this.timeFormat()));\r\n }\r\n return;\r\n }\r\n\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n let endDate = r.end\r\n .clone()\r\n .hour(parsedTime.hour())\r\n .minute(parsedTime.minute());\r\n if (endDate.isBefore(r.start)) {\r\n const startDateHours = r.start.hour();\r\n const startDateMinutes = r.start.minute();\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n this._setRangeFromInput({\r\n start: r.start.clone().toISOString(),\r\n end: endDate.toISOString(),\r\n whichDate: 'end',\r\n });\r\n }\r\n }\r\n\r\n private _onChange: (value: DateRangeOutputValue) => void = () => { /* empty */ };\r\n private _onTouched: () => void = () => { /* empty */ };\r\n\r\n private _setRangeFromInput(value: DateRangeInputValue | null): void {\r\n if (!(value?.start && value.end)) {\r\n this._range.set({ start: null, end: null });\r\n this.activeDates.set({\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month'),\r\n });\r\n return;\r\n }\r\n const whichDate = value.whichDate ?? null;\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n const currentRange = this._range();\r\n\r\n let newStart = currentRange.start;\r\n let newEnd = currentRange.end;\r\n\r\n if (whichDate === 'start') {\r\n newStart = start.clone();\r\n if (newEnd && newStart.isAfter(newEnd)) {\r\n newEnd = start\r\n .clone()\r\n .hour(newEnd.hour())\r\n .minute(newEnd.minute())\r\n .second(newEnd.second());\r\n if (!newStart.isBefore(newEnd)) {\r\n newEnd = start.clone();\r\n }\r\n }\r\n }\r\n if (whichDate === 'end') {\r\n newEnd = end.clone();\r\n if (newStart?.isAfter(newEnd)) {\r\n newStart = end\r\n .clone()\r\n .hour(newStart.hour())\r\n .minute(newStart.minute())\r\n .second(newStart.second());\r\n if (!newEnd.isAfter(newStart)) {\r\n newStart = end.clone();\r\n }\r\n }\r\n }\r\n if (!whichDate) {\r\n newStart = start.clone();\r\n newEnd = start.isBefore(end) ? end.clone() : start.clone();\r\n }\r\n\r\n this._range.set({ start: newStart, end: newEnd });\r\n\r\n if (newStart && newEnd) {\r\n const rangeOutput = {\r\n start: newStart.toISOString(),\r\n end: newEnd.toISOString(),\r\n };\r\n \r\n if (!this._programmaticChange && !this._emittingChange) {\r\n this._emittingChange = true;\r\n try {\r\n this.rangeChanged.emit(rangeOutput);\r\n this._onTouched();\r\n this._onChange(rangeOutput);\r\n } finally {\r\n setTimeout(() => {\r\n this._emittingChange = false;\r\n }, 0);\r\n }\r\n }\r\n \r\n this.activeDates.set({\r\n month1: newStart.clone(),\r\n month2: newStart.clone().add(1, 'month'),\r\n });\r\n const timeFmt = this.timeFormat();\r\n const startCtrl = this.startTimeFormControl;\r\n const endCtrl = this.endTimeFormControl;\r\n if (startCtrl && startCtrl.value !== newStart.clone().format(timeFmt)) {\r\n startCtrl.setValue(newStart.clone().format(timeFmt));\r\n }\r\n if (endCtrl && endCtrl.value !== newEnd.clone().format(timeFmt)) {\r\n endCtrl.setValue(newEnd.clone().format(timeFmt));\r\n }\r\n }\r\n\r\n const matMonthView1 = this._matMonthView1();\r\n const matMonthView2 = this._matMonthView2();\r\n if (matMonthView1 && matMonthView2) {\r\n const newDateClassFn = this.dateClassFn();\r\n const newDateFilterFn = this.dateFilterFn();\r\n matMonthView1.dateClass = newDateClassFn;\r\n matMonthView2.dateClass = newDateClassFn;\r\n matMonthView1.dateFilter = newDateFilterFn;\r\n matMonthView2.dateFilter = newDateFilterFn;\r\n matMonthView1.ngAfterContentInit();\r\n matMonthView2.ngAfterContentInit();\r\n }\r\n this._programmaticChange = false;\r\n }\r\n\r\n private _init(): void {\r\n this.startTimeFormControl =\r\n new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl =\r\n new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this._programmaticChange = true;\r\n const rangeValue = this.range();\r\n\r\n if (rangeValue) {\r\n this._setRangeFromInput(rangeValue);\r\n } else {\r\n this._setRangeFromInput({\r\n start: dayjs().startOf('day').toISOString(),\r\n end: dayjs().add(1, 'day').endOf('day').toISOString(),\r\n });\r\n }\r\n }\r\n\r\n private _parseTime(value: string): Dayjs {\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n const meridiem = timeArr[2] || null;\r\n if (meridiem) {\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n return dayjs(value, 'HH:mm').second(0);\r\n }\r\n}","<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>开始时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>结束时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAoFa,sBAAsB,CAAA;AAyFjC,IAAA,WAAA,GAAA;QAvFS,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE;yFAAC;QAChC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,YAAY;uFAAC;QACxC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAiB,OAAO,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,YAAA,EAAA,8BAAA,EAAA,CAAA,EACjD,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,EAAA,CACjE;QACO,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;QAChC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,IAAI;sFAAC;QAChC,IAAA,CAAA,KAAK,GAAG,KAAK,CAA6B,IAAI;kFAAC;QAC/C,IAAA,CAAA,YAAY,GAAG,MAAM,EAAkC;QAEvD,IAAA,CAAA,WAAW,GAAG,MAAM,CAAmC;YAC9D,MAAM,EAAE,KAAK,EAAE;YACf,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC;AAChC,SAAA;wFAAC;QACO,IAAA,CAAA,YAAY,GAAG,MAAM,CAAkB,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,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACP,mBAAmB,sEAC5B,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzJ/E;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-date-range.mjs","sources":["../../../projects/cmat/components/date-range/date-range.component.ts","../../../projects/cmat/components/date-range/date-range.component.html","../../../projects/cmat/components/date-range/cmat-components-date-range.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { TemplatePortal } from '@angular/cdk/portal';\r\nimport { NgClass } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n effect,\r\n ElementRef,\r\n forwardRef,\r\n inject,\r\n input,\r\n OnDestroy,\r\n OnInit,\r\n output,\r\n signal,\r\n TemplateRef,\r\n untracked,\r\n viewChild,\r\n ViewContainerRef,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport {\r\n ControlValueAccessor,\r\n FormControl,\r\n NG_VALUE_ACCESSOR,\r\n Validators,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n} from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport {\r\n MatCalendarCellCssClasses,\r\n MatMonthView,\r\n} from '@angular/material/datepicker';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport isBetween from 'dayjs/plugin/isBetween';\r\n\r\nexport interface DateRangeInputValue {\r\n start: string;\r\n end: string;\r\n whichDate?: 'start' | 'end' | '';\r\n}\r\n\r\nexport interface DateRangeOutputValue {\r\n start: string | null;\r\n end: string | null;\r\n}\r\n\r\nexport interface DateRangeDisplayValue {\r\n startDate: string | null;\r\n startTime: string | null;\r\n endDate: string | null;\r\n endTime: string | null;\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-date-range',\r\n templateUrl: './date-range.component.html',\r\n styleUrls: ['./date-range.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatDateRange',\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CmatDateRangeComponent),\r\n multi: true,\r\n },\r\n ],\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatFormFieldModule,\r\n MatMonthView,\r\n MatInputModule,\r\n NgClass,\r\n ],\r\n})\r\nexport class CmatDateRangeComponent\r\n implements ControlValueAccessor, OnInit, OnDestroy {\r\n readonly controlClass = input<string>('');\r\n readonly dateFormat = input<string>('YYYY/MM/DD');\r\n readonly timeFormat = input<string, string>('HH:mm', {\r\n transform: (value: string) => value === '12' ? 'hh:mmA' : 'HH:mm',\r\n });\r\n readonly readonly = input<boolean>(false);\r\n readonly timeRange = input<boolean>(true);\r\n readonly range = input<DateRangeInputValue | null>(null);\r\n readonly rangeChanged = output<{ start: string; end: string }>();\r\n\r\n readonly activeDates = signal<{ month1: Dayjs; month2: Dayjs }>({\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month'),\r\n });\r\n readonly setWhichDate = signal<'start' | 'end'>('start');\r\n startTimeFormControl: FormControl;\r\n endTimeFormControl: FormControl;\r\n\r\n readonly rangeDisplay = computed<DateRangeDisplayValue | undefined>(() => {\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n const start = r.start.clone();\r\n const end = r.end.clone();\r\n return {\r\n startDate: start.format(this.dateFormat()),\r\n startTime: this.timeRange() ? start.format(this.timeFormat()) : null,\r\n endDate: end.format(this.dateFormat()),\r\n endTime: this.timeRange() ? end.format(this.timeFormat()) : null,\r\n };\r\n }\r\n return undefined;\r\n });\r\n\r\n readonly dateClassFn = computed<(date: Dayjs) => MatCalendarCellCssClasses>(() => {\r\n const r = this._range();\r\n return (date: Dayjs): MatCalendarCellCssClasses => {\r\n if (r.start && r.end) {\r\n if (date.isSame(r.start, 'day') && date.isSame(r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start', 'cmat-date-range-end'];\r\n }\r\n if (date.isSame(r.start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n if (date.isSame(r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-end'];\r\n }\r\n if (date.isBetween(r.start, r.end, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-mid'];\r\n }\r\n } else if (r.start && date.isSame(r.start, 'day')) {\r\n return ['cmat-date-range', 'cmat-date-range-start'];\r\n }\r\n return [];\r\n };\r\n });\r\n\r\n readonly dateFilterFn = computed<(date: Dayjs) => boolean>(() => {\r\n const which = this.setWhichDate();\r\n const r = this._range();\r\n return (date: Dayjs): boolean => {\r\n return !(which === 'end' && r.start && date.isBefore(r.start, 'day'));\r\n };\r\n });\r\n\r\n private readonly _matMonthView1 = viewChild<MatMonthView<Dayjs>>('matMonthView1');\r\n private readonly _matMonthView2 = viewChild<MatMonthView<Dayjs>>('matMonthView2');\r\n private readonly _pickerPanelOrigin = viewChild<ElementRef<HTMLElement>>('pickerPanelOrigin');\r\n private readonly _pickerPanel = viewChild<TemplateRef<unknown>>('pickerPanel');\r\n\r\n private readonly _overlay = inject(Overlay);\r\n private readonly _viewContainerRef = inject(ViewContainerRef);\r\n private _overlayRef: OverlayRef | null = null;\r\n\r\n private readonly _range = signal<{ start: Dayjs | null; end: Dayjs | null }>({\r\n start: null,\r\n end: null,\r\n });\r\n\r\n private _programmaticChange = false;\r\n private _rangeInputFirstRun = true;\r\n private _timeRangeFirstRun = true;\r\n private _emittingChange = false;\r\n private readonly _timeRegExp: RegExp = new RegExp(\r\n '^(0[0-9]|1[0-9]|2[0-4]|[0-9]):([0-5][0-9])(A|(?:AM)|P|(?:PM))?$',\r\n 'i',\r\n );\r\n\r\n constructor() {\r\n dayjs.extend(isBetween);\r\n\r\n effect(() => {\r\n const rangeValue = this.range();\r\n\r\n if (this._rangeInputFirstRun) {\r\n this._rangeInputFirstRun = false;\r\n return;\r\n }\r\n\r\n untracked(() => {\r\n this._setRangeFromInput(rangeValue);\r\n });\r\n });\r\n\r\n effect(() => {\r\n const tr = this.timeRange();\r\n if (this._timeRangeFirstRun) {\r\n this._timeRangeFirstRun = false;\r\n return;\r\n }\r\n\r\n untracked(() => {\r\n if (!tr && this._range().start && this._range().end) {\r\n this._setRangeFromInput({\r\n start: this._range().start!.clone().startOf('day').toISOString(),\r\n end: this._range().end!.clone().endOf('day').toISOString(),\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n registerOnChange(fn: (value: DateRangeOutputValue) => void): void {\r\n this._onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this._onTouched = fn;\r\n }\r\n\r\n writeValue(range: DateRangeInputValue | null): void {\r\n this._programmaticChange = true;\r\n this._setRangeFromInput(range);\r\n }\r\n\r\n ngOnInit(): void {\r\n this._init();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._overlayRef) {\r\n this._overlayRef.dispose();\r\n this._overlayRef = null;\r\n }\r\n }\r\n\r\n openPickerPanel(): void {\r\n if (this.readonly()) return;\r\n const origin = this._pickerPanelOrigin();\r\n if (!origin) return;\r\n\r\n const overlayRef = this._overlay.create({\r\n panelClass: 'cmat-date-range-panel',\r\n backdropClass: '',\r\n hasBackdrop: true,\r\n scrollStrategy: this._overlay.scrollStrategies.reposition(),\r\n positionStrategy: this._overlay\r\n .position()\r\n .flexibleConnectedTo(origin)\r\n .withPositions([\r\n {\r\n originX: 'start',\r\n originY: 'bottom',\r\n overlayX: 'start',\r\n overlayY: 'top',\r\n offsetY: 8,\r\n },\r\n {\r\n originX: 'start',\r\n originY: 'top',\r\n overlayX: 'start',\r\n overlayY: 'bottom',\r\n offsetY: -8,\r\n },\r\n ]),\r\n });\r\n\r\n this._overlayRef = overlayRef;\r\n const templatePortal = new TemplatePortal(\r\n this._pickerPanel()!,\r\n this._viewContainerRef,\r\n );\r\n\r\n overlayRef.backdropClick().subscribe((): void => {\r\n if (templatePortal?.isAttached) {\r\n templatePortal.detach();\r\n }\r\n if (overlayRef?.hasAttached()) {\r\n overlayRef.detach();\r\n overlayRef.dispose();\r\n }\r\n this._overlayRef = null;\r\n });\r\n\r\n overlayRef.attach(templatePortal);\r\n }\r\n\r\n getMonthLabel(month: number): string {\r\n const dates = this.activeDates();\r\n if (month === 1) {\r\n return dates.month1?.clone().format('YYYY MMMM') ?? '';\r\n }\r\n return dates.month2?.clone().format('YYYY MMMM') ?? '';\r\n }\r\n\r\n onActiveDateChange(month: number, date: Dayjs): void {\r\n this.activeDates.update((dates) => {\r\n if (month === 1) {\r\n return { month1: date, month2: dates.month2 };\r\n }\r\n return { month1: dates.month1, month2: date };\r\n });\r\n }\r\n\r\n onSelectedDateChange(date: Dayjs | null): void {\r\n if (!date) return;\r\n const whichDate = this.setWhichDate();\r\n const r = this._range();\r\n const newRange: DateRangeInputValue = {\r\n start: (whichDate === 'start'\r\n ? (r.start ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())\r\n : r.start ?? date\r\n ).toISOString(),\r\n end: (whichDate === 'end'\r\n ? (r.end ?? dayjs()).clone().year(date.year()).month(date.month()).date(date.date())\r\n : r.end ?? date\r\n ).toISOString(),\r\n whichDate,\r\n };\r\n this.setWhichDate.set(whichDate === 'start' ? 'end' : 'start');\r\n this._setRangeFromInput(newRange);\r\n }\r\n\r\n prev(): void {\r\n this.activeDates.update(dates => ({\r\n month1: dayjs(dates.month1).subtract(1, 'month'),\r\n month2: dayjs(dates.month2).subtract(1, 'month'),\r\n }));\r\n }\r\n\r\n next(): void {\r\n this.activeDates.update(dates => ({\r\n month1: dayjs(dates.month1).add(1, 'month'),\r\n month2: dayjs(dates.month2).add(1, 'month'),\r\n }));\r\n }\r\n\r\n updateStartTime(event: Event): void {\r\n const input = event.target as HTMLInputElement | null;\r\n const value = input?.value ?? '';\r\n const parsedTime = this._parseTime(value);\r\n const formControl = this.startTimeFormControl;\r\n\r\n if (formControl?.invalid) {\r\n const r = this._range();\r\n if (r.start) {\r\n formControl.setValue(r.start.clone().format(this.timeFormat()));\r\n }\r\n return;\r\n }\r\n\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n let startDate = r.start\r\n .clone()\r\n .hour(parsedTime.hour())\r\n .minute(parsedTime.minute());\r\n if (startDate.isAfter(r.end)) {\r\n const endDateHours = r.end.hour();\r\n const endDateMinutes = r.end.minute();\r\n startDate.hour(endDateHours).minute(endDateMinutes);\r\n }\r\n this._setRangeFromInput({\r\n start: startDate.toISOString(),\r\n end: r.end.clone().toISOString(),\r\n whichDate: 'start',\r\n });\r\n }\r\n }\r\n\r\n updateEndTime(event: Event): void {\r\n const input = event.target as HTMLInputElement | null;\r\n const value = input?.value ?? '';\r\n const parsedTime = this._parseTime(value);\r\n const formControl = this.endTimeFormControl;\r\n\r\n if (formControl?.invalid) {\r\n const r = this._range();\r\n if (r.end) {\r\n formControl.setValue(r.end.clone().format(this.timeFormat()));\r\n }\r\n return;\r\n }\r\n\r\n const r = this._range();\r\n if (r.start && r.end) {\r\n let endDate = r.end\r\n .clone()\r\n .hour(parsedTime.hour())\r\n .minute(parsedTime.minute());\r\n if (endDate.isBefore(r.start)) {\r\n const startDateHours = r.start.hour();\r\n const startDateMinutes = r.start.minute();\r\n endDate.hour(startDateHours).minute(startDateMinutes);\r\n }\r\n this._setRangeFromInput({\r\n start: r.start.clone().toISOString(),\r\n end: endDate.toISOString(),\r\n whichDate: 'end',\r\n });\r\n }\r\n }\r\n\r\n private _onChange: (value: DateRangeOutputValue) => void = () => { /* empty */ };\r\n private _onTouched: () => void = () => { /* empty */ };\r\n\r\n private _setRangeFromInput(value: DateRangeInputValue | null): void {\r\n if (!(value?.start && value.end)) {\r\n this._range.set({ start: null, end: null });\r\n this.activeDates.set({\r\n month1: dayjs(),\r\n month2: dayjs().add(1, 'month'),\r\n });\r\n return;\r\n }\r\n const whichDate = value.whichDate ?? null;\r\n const start = dayjs(value.start);\r\n const end = dayjs(value.end);\r\n const currentRange = this._range();\r\n\r\n let newStart = currentRange.start;\r\n let newEnd = currentRange.end;\r\n\r\n if (whichDate === 'start') {\r\n newStart = start.clone();\r\n if (newEnd && newStart.isAfter(newEnd)) {\r\n newEnd = start\r\n .clone()\r\n .hour(newEnd.hour())\r\n .minute(newEnd.minute())\r\n .second(newEnd.second());\r\n if (!newStart.isBefore(newEnd)) {\r\n newEnd = start.clone();\r\n }\r\n }\r\n }\r\n if (whichDate === 'end') {\r\n newEnd = end.clone();\r\n if (newStart?.isAfter(newEnd)) {\r\n newStart = end\r\n .clone()\r\n .hour(newStart.hour())\r\n .minute(newStart.minute())\r\n .second(newStart.second());\r\n if (!newEnd.isAfter(newStart)) {\r\n newStart = end.clone();\r\n }\r\n }\r\n }\r\n if (!whichDate) {\r\n newStart = start.clone();\r\n newEnd = start.isBefore(end) ? end.clone() : start.clone();\r\n }\r\n\r\n this._range.set({ start: newStart, end: newEnd });\r\n\r\n if (newStart && newEnd) {\r\n const rangeOutput = {\r\n start: newStart.toISOString(),\r\n end: newEnd.toISOString(),\r\n };\r\n \r\n if (!this._programmaticChange && !this._emittingChange) {\r\n this._emittingChange = true;\r\n try {\r\n this.rangeChanged.emit(rangeOutput);\r\n this._onTouched();\r\n this._onChange(rangeOutput);\r\n } finally {\r\n setTimeout(() => {\r\n this._emittingChange = false;\r\n }, 0);\r\n }\r\n }\r\n \r\n this.activeDates.set({\r\n month1: newStart.clone(),\r\n month2: newStart.clone().add(1, 'month'),\r\n });\r\n const timeFmt = this.timeFormat();\r\n const startCtrl = this.startTimeFormControl;\r\n const endCtrl = this.endTimeFormControl;\r\n if (startCtrl && startCtrl.value !== newStart.clone().format(timeFmt)) {\r\n startCtrl.setValue(newStart.clone().format(timeFmt));\r\n }\r\n if (endCtrl && endCtrl.value !== newEnd.clone().format(timeFmt)) {\r\n endCtrl.setValue(newEnd.clone().format(timeFmt));\r\n }\r\n }\r\n\r\n const matMonthView1 = this._matMonthView1();\r\n const matMonthView2 = this._matMonthView2();\r\n if (matMonthView1 && matMonthView2) {\r\n const newDateClassFn = this.dateClassFn();\r\n const newDateFilterFn = this.dateFilterFn();\r\n matMonthView1.dateClass = newDateClassFn;\r\n matMonthView2.dateClass = newDateClassFn;\r\n matMonthView1.dateFilter = newDateFilterFn;\r\n matMonthView2.dateFilter = newDateFilterFn;\r\n matMonthView1.ngAfterContentInit();\r\n matMonthView2.ngAfterContentInit();\r\n }\r\n this._programmaticChange = false;\r\n }\r\n\r\n private _init(): void {\r\n this.startTimeFormControl =\r\n new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this.endTimeFormControl =\r\n new FormControl('', [Validators.pattern(this._timeRegExp)]);\r\n this._programmaticChange = true;\r\n const rangeValue = this.range();\r\n\r\n if (rangeValue) {\r\n this._setRangeFromInput(rangeValue);\r\n } else {\r\n this._setRangeFromInput({\r\n start: dayjs().startOf('day').toISOString(),\r\n end: dayjs().add(1, 'day').endOf('day').toISOString(),\r\n });\r\n }\r\n }\r\n\r\n private _parseTime(value: string): Dayjs {\r\n const timeArr = value.split(this._timeRegExp).filter(part => part !== '');\r\n const meridiem = timeArr[2] || null;\r\n if (meridiem) {\r\n return dayjs(value, 'hh:mmA').second(0);\r\n }\r\n return dayjs(value, 'HH:mm').second(0);\r\n }\r\n}","<div #pickerPanelOrigin role=\"presentation\" class=\"range\" (click)=\"openPickerPanel()\">\r\n\r\n <div class=\"start\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.startDate}}</div>\r\n @if (rangeDisplay()?.startTime) {\r\n <div class=\"time\">{{rangeDisplay()?.startTime}}</div>\r\n }\r\n </div>\r\n\r\n <div class=\"separator\">-</div>\r\n\r\n <div class=\"end\" [ngClass]=\"controlClass()\">\r\n <div class=\"date\">{{rangeDisplay()?.endDate}}</div>\r\n @if (rangeDisplay()?.endTime) {\r\n <div class=\"time\">{{rangeDisplay()?.endTime}}</div>\r\n }\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #pickerPanel>\r\n\r\n <!-- Start -->\r\n <div class=\"start\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <button type=\"button\" class=\"previous-button\" matIconButton tabindex=\"1\" (click)=\"prev()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-left'\"></mat-icon>\r\n </button>\r\n <div class=\"month-label\">{{getMonthLabel(1)}}</div>\r\n </div>\r\n <mat-month-view #matMonthView1 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month1\" (activeDateChange)=\"onActiveDateChange(1, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time start-time\">\r\n <input matInput tabindex=\"3\" [autocomplete]=\"'off'\" [formControl]=\"startTimeFormControl\"\r\n (blur)=\"updateStartTime($event)\">\r\n <mat-label>开始时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n <!-- End -->\r\n <div class=\"end\">\r\n\r\n <div class=\"month\">\r\n <div class=\"month-header\">\r\n <div class=\"month-label\">{{getMonthLabel(2)}}</div>\r\n <button type=\"button\" class=\"next-button\" matIconButton tabindex=\"2\" (click)=\"next()\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:chevron-right'\"></mat-icon>\r\n </button>\r\n </div>\r\n <mat-month-view #matMonthView2 [dateFilter]=\"dateFilterFn()\" [dateClass]=\"dateClassFn()\"\r\n [activeDate]=\"activeDates().month2\" (activeDateChange)=\"onActiveDateChange(2, $event)\"\r\n (click)=\"$event.stopImmediatePropagation()\"\r\n (selectedChange)=\"onSelectedDateChange($event)\">\r\n </mat-month-view>\r\n </div>\r\n\r\n @if (timeRange()) {\r\n <mat-form-field class=\"time end-time\">\r\n <input matInput tabindex=\"4\" [formControl]=\"endTimeFormControl\" (blur)=\"updateEndTime($event)\">\r\n <mat-label>结束时间</mat-label>\r\n </mat-form-field>\r\n }\r\n\r\n </div>\r\n\r\n </ng-template>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAoFa,sBAAsB,CAAA;AAyFjC,IAAA,WAAA,GAAA;QAvFS,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE;yFAAC;QAChC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,YAAY;uFAAC;QACxC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAiB,OAAO,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,YAAA,EAAA,8BAAA,EAAA,CAAA,EACjD,SAAS,EAAE,CAAC,KAAa,KAAK,KAAK,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,EAAA,CACjE;QACO,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;QAChC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAU,IAAI;sFAAC;QAChC,IAAA,CAAA,KAAK,GAAG,KAAK,CAA6B,IAAI;kFAAC;QAC/C,IAAA,CAAA,YAAY,GAAG,MAAM,EAAkC;QAEvD,IAAA,CAAA,WAAW,GAAG,MAAM,CAAmC;YAC9D,MAAM,EAAE,KAAK,EAAE;YACf,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC;AAChC,SAAA;wFAAC;QACO,IAAA,CAAA,YAAY,GAAG,MAAM,CAAkB,OAAO;yFAAC;AAI/C,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAoC,MAAK;AACvE,YAAA,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,IAAI,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AAA,EAAA,EAAA,CAAA;;AEzJ/E;;AAEG;;;;"}
@@ -26,11 +26,11 @@ class CmatMasonryComponent {
26
26
  ...(ngDevMode ? [{ debugName: "distributedColumns" }] : /* istanbul ignore next */ []));
27
27
  }
28
28
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CmatMasonryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
29
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: CmatMasonryComponent, isStandalone: true, selector: "cmat-masonry", inputs: { columnsTemplate: { classPropertyName: "columnsTemplate", publicName: "columnsTemplate", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["cmatMasonry"], ngImport: i0, template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
29
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: CmatMasonryComponent, isStandalone: true, selector: "cmat-masonry", inputs: { columnsTemplate: { classPropertyName: "columnsTemplate", publicName: "columnsTemplate", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["cmatMasonry"], ngImport: i0, template: "<div class=\"flex\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
30
30
  }
31
31
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CmatMasonryComponent, decorators: [{
32
32
  type: Component,
33
- args: [{ selector: 'cmat-masonry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatMasonry', imports: [NgTemplateOutlet], template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>" }]
33
+ args: [{ selector: 'cmat-masonry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatMasonry', imports: [NgTemplateOutlet], template: "<div class=\"flex\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>" }]
34
34
  }], propDecorators: { columnsTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnsTemplate", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }] } });
35
35
 
36
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-components-masonry.mjs","sources":["../../../projects/cmat/components/masonry/masonry.component.ts","../../../projects/cmat/components/masonry/masonry.component.html","../../../projects/cmat/components/masonry/cmat-components-masonry.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n TemplateRef,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n} from '@angular/core';\r\n\r\ninterface MasonryColumn {\r\n items: unknown[];\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-masonry',\r\n templateUrl: './masonry.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatMasonry',\r\n imports: [NgTemplateOutlet]\r\n})\r\nexport class CmatMasonryComponent {\r\n readonly columnsTemplate = input.required<TemplateRef<unknown>>(); \r\n readonly columns = input.required<number>();\r\n readonly items = input<unknown[]>([]);\r\n\r\n readonly distributedColumns = computed<MasonryColumn[]>(() => {\r\n const cols = this.columns();\r\n const itemList = this.items();\r\n\r\n if (!itemList || itemList.length === 0) {\r\n return [];\r\n }\r\n\r\n const newDistributedColumns: MasonryColumn[] = Array.from({ length: cols }, () => ({ items: [] }));\r\n\r\n for (let i = 0; i < itemList.length; i++) {\r\n const columnIndex = i % cols;\r\n newDistributedColumns[columnIndex].items.push(itemList[i]);\r\n }\r\n\r\n return newDistributedColumns;\r\n });\r\n}","<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAsBa,oBAAoB,CAAA;AARjC,IAAA,WAAA,GAAA;QASa,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,QAAQ;4FAAwB;QACxD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAU;QAClC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,EAAE;kFAAC;AAE5B,QAAA,IAAA,CAAA,kBAAkB,GAAG,QAAQ,CAAkB,MAAK;AACzD,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;AAC3B,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE;YAE7B,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AAC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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDkBQ,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAEjB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,aAAA,EAET,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,aAAa,EAAA,OAAA,EACd,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,+JAAA,EAAA;;;AEpB/B;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-components-masonry.mjs","sources":["../../../projects/cmat/components/masonry/masonry.component.ts","../../../projects/cmat/components/masonry/masonry.component.html","../../../projects/cmat/components/masonry/cmat-components-masonry.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n TemplateRef,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n} from '@angular/core';\r\n\r\ninterface MasonryColumn {\r\n items: unknown[];\r\n}\r\n\r\n@Component({\r\n selector: 'cmat-masonry',\r\n templateUrl: './masonry.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n exportAs: 'cmatMasonry',\r\n imports: [NgTemplateOutlet]\r\n})\r\nexport class CmatMasonryComponent {\r\n readonly columnsTemplate = input.required<TemplateRef<unknown>>(); \r\n readonly columns = input.required<number>();\r\n readonly items = input<unknown[]>([]);\r\n\r\n readonly distributedColumns = computed<MasonryColumn[]>(() => {\r\n const cols = this.columns();\r\n const itemList = this.items();\r\n\r\n if (!itemList || itemList.length === 0) {\r\n return [];\r\n }\r\n\r\n const newDistributedColumns: MasonryColumn[] = Array.from({ length: cols }, () => ({ items: [] }));\r\n\r\n for (let i = 0; i < itemList.length; i++) {\r\n const columnIndex = i % cols;\r\n newDistributedColumns[columnIndex].items.push(itemList[i]);\r\n }\r\n\r\n return newDistributedColumns;\r\n });\r\n}","<div class=\"flex\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate(); context: { $implicit: distributedColumns() }\"></ng-container>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAsBa,oBAAoB,CAAA;AARjC,IAAA,WAAA,GAAA;QASa,IAAA,CAAA,eAAe,GAAG,KAAK,CAAC,QAAQ;4FAAwB;QACxD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAU;QAClC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,EAAE;kFAAC;AAE5B,QAAA,IAAA,CAAA,kBAAkB,GAAG,QAAQ,CAAkB,MAAK;AACzD,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;AAC3B,YAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE;YAE7B,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;AACpC,gBAAA,OAAO,EAAE;YACb;YAEA,MAAM,qBAAqB,GAAoB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;AAElG,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,gBAAA,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI;AAC5B,gBAAA,qBAAqB,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC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AAA,EAET,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,aAAa,EAAA,OAAA,EACd,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,2JAAA,EAAA;;;AEpB/B;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { NgStyle, NgClass, DecimalPipe } from '@angular/common';
1
+ import { NgClass, NgStyle, DecimalPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { signal, untracked, Injectable, input, output, inject, Injector, effect, afterNextRender, Directive, ElementRef, DestroyRef, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Pipe } from '@angular/core';
4
4
  import * as i5 from '@angular/material/button';
@@ -421,22 +421,22 @@ class CmatPaginationComponent {
421
421
  });
422
422
  }
423
423
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CmatPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
424
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: CmatPaginationComponent, isStandalone: true, selector: "cmat-pagination", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPages: { classPropertyName: "itemsPerPages", publicName: "itemsPerPages", isSignal: true, isRequired: false, transformFunction: null }, initPerPage: { classPropertyName: "initPerPage", publicName: "initPerPage", isSignal: true, isRequired: false, transformFunction: null }, autoHide: { classPropertyName: "autoHide", publicName: "autoHide", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["cmatPagination"], ngImport: i0, template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id()\"\r\n [maxSize]=\"isScreenSmall() && maxSize() > 5 ? 5 : maxSize()\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"flex-auto items-center\" [ngClass]=\"{'hidden':isScreenSmall(),'flex':!isScreenSmall()}\">\r\n <span>\u603B\u8BA1:{{ p.getTotalItems() }}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12\" [ngClass]=\"{'w-full':isScreenSmall(),'w-0':!isScreenSmall()}\">\r\n @if (!(autoHide() && p.pages().length <= 1)) { \r\n <ul class=\"flex flex-row items-center w-full\"\r\n [ngClass]=\"{'justify-center':isScreenSmall(),'justify-end':!isScreenSmall()}\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === 1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === 1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages(); track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\" class=\"cursor-pointer text-gray-400 hover:text-current\"\r\n (click)=\"p.setCurrent(page.value)\">\r\n <span>{{\r\n page.label === \"...\"\r\n ? page.label\r\n : (page.label | number: \"\")\r\n }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{\r\n page.label === \"...\"\r\n ? page.label\r\n : (page.label | number: \"\")\r\n }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div>\r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"px-2\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field appearance=\"fill\" [ngStyle]=\"{\r\n width: (p.getLastPage()?.toString()?.length || 0) * 8 + 64 + 'px',\r\n }\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\" [value]=\"p.getCurrent()\"\r\n [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage() || 0\" (keyup.enter)=\"p.setCurrent(current.value)\" />\r\n <span matSuffix>/\r\n <div class=\"pl-1\">{{ p.getLastPage() }}</div>\r\n </span>\r\n </mat-form-field>\r\n </li>\r\n <li [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\" >\r\n <mat-form-field class=\"w-24\" appearance=\"fill\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage()\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages(); track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{ perPage }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n</pagination-template>", dependencies: [{ kind: "directive", type: CmatPaginationDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection", "perPageCountChange"], exportAs: ["paginationApi"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
424
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: CmatPaginationComponent, isStandalone: true, selector: "cmat-pagination", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, itemsPerPages: { classPropertyName: "itemsPerPages", publicName: "itemsPerPages", isSignal: true, isRequired: false, transformFunction: null }, initPerPage: { classPropertyName: "initPerPage", publicName: "initPerPage", isSignal: true, isRequired: false, transformFunction: null }, autoHide: { classPropertyName: "autoHide", publicName: "autoHide", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageBoundsCorrection: "pageBoundsCorrection", perPageCountChange: "perPageCountChange" }, exportAs: ["cmatPagination"], ngImport: i0, template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex items-center\" [id]=\"id()\"\r\n [maxSize]=\"isScreenSmall() && maxSize() > 5 ? 5 : maxSize()\"\r\n (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n @if (!(autoHide() && p.pages().length <= 1)) {\r\n <!-- \u5DE6\uFF1A\u603B\u8BA1 -->\r\n <div class=\"flex-auto\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <span class=\"text-sm text-secondary whitespace-nowrap\">\u5171 {{ p.getTotalItems() }} \u6761</span>\r\n </div>\r\n\r\n <!-- \u53F3\uFF1A\u5BFC\u822A -->\r\n <nav role=\"navigation\" class=\"flex\" [ngClass]=\"{'w-full':isScreenSmall()}\">\r\n <ul class=\"flex items-center\"\r\n [ngClass]=\"{'justify-center w-full gap-0':isScreenSmall(),'flex-row gap-0.5':!isScreenSmall()}\">\r\n\r\n <!-- \u9996\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === 1\" (click)=\"p.goFirstPage()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u4E0A\u4E00\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === 1\" (click)=\"p.previous()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"heroicons_outline:chevron-left\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u9875\u7801 -->\r\n <li class=\"mx-1\">\r\n <div class=\"flex items-center gap-0.5\">\r\n @for (page of p.pages(); track $index) {\r\n @if (page.label === \"...\") {\r\n <span class=\"flex items-center justify-center w-8 h-8 rounded-full text-sm text-secondary\">...</span>\r\n } @else if (p.getCurrent() === page.value) {\r\n <span class=\"flex items-center justify-center w-8 h-8 rounded-full bg-primary-500 text-white text-sm font-medium\">\r\n {{ page.label | number: \"\" }}\r\n </span>\r\n } @else {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full text-sm text-secondary cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors\"\r\n (click)=\"p.setCurrent(page.value)\">\r\n {{ page.label | number: \"\" }}\r\n </a>\r\n }\r\n }\r\n </div>\r\n </li>\r\n\r\n <!-- \u4E0B\u4E00\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\" (click)=\"p.next()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"heroicons_outline:chevron-right\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u672B\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\" (click)=\"p.goLastPage()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u9875\u7801\u8DF3\u8F6C\uFF08\u684C\u9762\u7AEF\uFF09 -->\r\n <li class=\"px-1\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field appearance=\"outline\" [ngStyle]=\"{\r\n width: (p.getLastPage()?.toString()?.length || 0) * 8 + 64 + 'px',\r\n }\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\" [value]=\"p.getCurrent()\"\r\n [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage() || 0\" (keyup.enter)=\"p.setCurrent(current.value)\" />\r\n <span matSuffix>/\r\n <div class=\"px-2\">{{ p.getLastPage() }}</div>\r\n </span>\r\n </mat-form-field>\r\n </li>\r\n\r\n <!-- \u6BCF\u9875\u6761\u6570\uFF08\u684C\u9762\u7AEF\uFF09 -->\r\n <li class=\"px-1\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field class=\"w-20\" appearance=\"outline\">\r\n <mat-select #pageCount [value]=\"initPerPage()\" (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages(); track perPage) {\r\n <mat-option [value]=\"perPage\">{{ perPage }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n </nav>\r\n }\r\n</pagination-template>\r\n\r\n<style>\r\n @media (hover: none) and (pointer: coarse) {\r\n cmat-pagination button[matIconButton] {\r\n transition: transform 150ms ease;\r\n }\r\n cmat-pagination button[matIconButton]:active:not([disabled]) {\r\n transform: scale(0.88);\r\n }\r\n }\r\n</style>\r\n", styles: ["@media(hover:none)and (pointer:coarse){cmat-pagination button[matIconButton]{transition:transform .15s ease}cmat-pagination button[matIconButton]:active:not([disabled]){transform:scale(.88)}}\n"], dependencies: [{ kind: "directive", type: CmatPaginationDirective, selector: "pagination-template,[pagination-template]", inputs: ["id", "maxSize"], outputs: ["pageChange", "pageBoundsCorrection", "perPageCountChange"], exportAs: ["paginationApi"] }, { kind: "directive", type: CmatDigitOnlyDirective, selector: "[cmatDigitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
425
425
  }
426
426
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CmatPaginationComponent, decorators: [{
427
427
  type: Component,
428
428
  args: [{ selector: 'cmat-pagination', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'cmatPagination', imports: [
429
429
  CmatPaginationDirective,
430
+ CmatDigitOnlyDirective,
430
431
  MatIconModule,
431
- NgStyle,
432
432
  MatFormFieldModule,
433
433
  MatInputModule,
434
- CmatDigitOnlyDirective,
435
434
  MatSelectModule,
436
435
  DecimalPipe,
437
436
  MatButtonModule,
438
- NgClass
439
- ], template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex\" [id]=\"id()\"\r\n [maxSize]=\"isScreenSmall() && maxSize() > 5 ? 5 : maxSize()\" (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n <div class=\"flex-auto items-center\" [ngClass]=\"{'hidden':isScreenSmall(),'flex':!isScreenSmall()}\">\r\n <span>\u603B\u8BA1:{{ p.getTotalItems() }}</span>\r\n </div>\r\n <nav role=\"navigation\" class=\"flex min-h-12\" [ngClass]=\"{'w-full':isScreenSmall(),'w-0':!isScreenSmall()}\">\r\n @if (!(autoHide() && p.pages().length <= 1)) { \r\n <ul class=\"flex flex-row items-center w-full\"\r\n [ngClass]=\"{'justify-center':isScreenSmall(),'justify-end':!isScreenSmall()}\">\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === 1\"\r\n (click)=\"p.goFirstPage()\">\r\n <mat-icon svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"pr-4\">\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === 1\"\r\n (click)=\"p.previous()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_before\"></mat-icon>\r\n </button>\r\n </li>\r\n <div class=\"flex flex-row gap-4\">\r\n @for (page of p.pages(); track $index) {\r\n <li class=\"flex text-xl lg:text-2xl\">\r\n @if (p.getCurrent() !== page.value) {\r\n <a tabindex=\"0\" role=\"presentation\" class=\"cursor-pointer text-gray-400 hover:text-current\"\r\n (click)=\"p.setCurrent(page.value)\">\r\n <span>{{\r\n page.label === \"...\"\r\n ? page.label\r\n : (page.label | number: \"\")\r\n }}</span>\r\n </a>\r\n }\r\n @if (p.getCurrent() === page.value) {\r\n <span class=\"text-current\">\r\n <span>{{\r\n page.label === \"...\"\r\n ? page.label\r\n : (page.label | number: \"\")\r\n }}</span>\r\n </span>\r\n }\r\n </li>\r\n }\r\n </div>\r\n <li class=\"pl-4\">\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\"\r\n (click)=\"p.next()\">\r\n <mat-icon svgIcon=\"mat_outline:navigate_next\"></mat-icon>\r\n </button>\r\n </li>\r\n <li>\r\n <button type=\"button\" class=\"flex items-center\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\"\r\n (click)=\"p.goLastPage()\">\r\n <mat-icon svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n <li class=\"px-2\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field appearance=\"fill\" [ngStyle]=\"{\r\n width: (p.getLastPage()?.toString()?.length || 0) * 8 + 64 + 'px',\r\n }\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\" [value]=\"p.getCurrent()\"\r\n [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage() || 0\" (keyup.enter)=\"p.setCurrent(current.value)\" />\r\n <span matSuffix>/\r\n <div class=\"pl-1\">{{ p.getLastPage() }}</div>\r\n </span>\r\n </mat-form-field>\r\n </li>\r\n <li [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\" >\r\n <mat-form-field class=\"w-24\" appearance=\"fill\">\r\n <mat-select #pageCount name=\"pageCount\" [value]=\"initPerPage()\"\r\n (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages(); track perPage) {\r\n <mat-option [value]=\"perPage\">\r\n {{ perPage }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n }\r\n </nav>\r\n</pagination-template>" }]
437
+ NgClass,
438
+ NgStyle,
439
+ ], template: "<pagination-template #p=\"paginationApi\" class=\"w-full px-4 py-2 flex items-center\" [id]=\"id()\"\r\n [maxSize]=\"isScreenSmall() && maxSize() > 5 ? 5 : maxSize()\"\r\n (pageChange)=\"pageChange.emit($event)\"\r\n (pageBoundsCorrection)=\"pageBoundsCorrection.emit($event)\" (perPageCountChange)=\"perPageCountChange.emit($event)\">\r\n @if (!(autoHide() && p.pages().length <= 1)) {\r\n <!-- \u5DE6\uFF1A\u603B\u8BA1 -->\r\n <div class=\"flex-auto\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <span class=\"text-sm text-secondary whitespace-nowrap\">\u5171 {{ p.getTotalItems() }} \u6761</span>\r\n </div>\r\n\r\n <!-- \u53F3\uFF1A\u5BFC\u822A -->\r\n <nav role=\"navigation\" class=\"flex\" [ngClass]=\"{'w-full':isScreenSmall()}\">\r\n <ul class=\"flex items-center\"\r\n [ngClass]=\"{'justify-center w-full gap-0':isScreenSmall(),'flex-row gap-0.5':!isScreenSmall()}\">\r\n\r\n <!-- \u9996\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === 1\" (click)=\"p.goFirstPage()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"mat_outline:first_page\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u4E0A\u4E00\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === 1\" (click)=\"p.previous()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"heroicons_outline:chevron-left\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u9875\u7801 -->\r\n <li class=\"mx-1\">\r\n <div class=\"flex items-center gap-0.5\">\r\n @for (page of p.pages(); track $index) {\r\n @if (page.label === \"...\") {\r\n <span class=\"flex items-center justify-center w-8 h-8 rounded-full text-sm text-secondary\">...</span>\r\n } @else if (p.getCurrent() === page.value) {\r\n <span class=\"flex items-center justify-center w-8 h-8 rounded-full bg-primary-500 text-white text-sm font-medium\">\r\n {{ page.label | number: \"\" }}\r\n </span>\r\n } @else {\r\n <a tabindex=\"0\" role=\"presentation\"\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full text-sm text-secondary cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors\"\r\n (click)=\"p.setCurrent(page.value)\">\r\n {{ page.label | number: \"\" }}\r\n </a>\r\n }\r\n }\r\n </div>\r\n </li>\r\n\r\n <!-- \u4E0B\u4E00\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\" (click)=\"p.next()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"heroicons_outline:chevron-right\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u672B\u9875 -->\r\n <li>\r\n <button type=\"button\" matIconButton [disabled]=\"p.getCurrent() === p.getLastPage()\" (click)=\"p.goLastPage()\">\r\n <mat-icon class=\"icon-size-5\" svgIcon=\"mat_outline:last_page\"></mat-icon>\r\n </button>\r\n </li>\r\n\r\n <!-- \u9875\u7801\u8DF3\u8F6C\uFF08\u684C\u9762\u7AEF\uFF09 -->\r\n <li class=\"px-1\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field appearance=\"outline\" [ngStyle]=\"{\r\n width: (p.getLastPage()?.toString()?.length || 0) * 8 + 64 + 'px',\r\n }\">\r\n <input #current matInput type=\"text\" cmatDigitOnly class=\"text-end\" [value]=\"p.getCurrent()\"\r\n [autocomplete]=\"'off'\" [min]=\"0\" [max]=\"p.getLastPage() || 0\" (keyup.enter)=\"p.setCurrent(current.value)\" />\r\n <span matSuffix>/\r\n <div class=\"px-2\">{{ p.getLastPage() }}</div>\r\n </span>\r\n </mat-form-field>\r\n </li>\r\n\r\n <!-- \u6BCF\u9875\u6761\u6570\uFF08\u684C\u9762\u7AEF\uFF09 -->\r\n <li class=\"px-1\" [ngClass]=\"{'hidden':isScreenSmall(),'block':!isScreenSmall()}\">\r\n <mat-form-field class=\"w-20\" appearance=\"outline\">\r\n <mat-select #pageCount [value]=\"initPerPage()\" (selectionChange)=\"p.setItemsPerPage(pageCount.value)\">\r\n @for (perPage of itemsPerPages(); track perPage) {\r\n <mat-option [value]=\"perPage\">{{ perPage }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n </li>\r\n </ul>\r\n </nav>\r\n }\r\n</pagination-template>\r\n\r\n<style>\r\n @media (hover: none) and (pointer: coarse) {\r\n cmat-pagination button[matIconButton] {\r\n transition: transform 150ms ease;\r\n }\r\n cmat-pagination button[matIconButton]:active:not([disabled]) {\r\n transform: scale(0.88);\r\n }\r\n }\r\n</style>\r\n" }]
440
440
  }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], itemsPerPages: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsPerPages", required: false }] }], initPerPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "initPerPage", required: false }] }], autoHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHide", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], pageBoundsCorrection: [{ type: i0.Output, args: ["pageBoundsCorrection"] }], perPageCountChange: [{ type: i0.Output, args: ["perPageCountChange"] }] } });
441
441
 
442
442
  const LARGE_NUMBER = Number.MAX_SAFE_INTEGER;