@brggroup/share-lib 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ import * as i5 from 'ng-zorro-antd/form';
30
30
  import { NzFormModule } from 'ng-zorro-antd/form';
31
31
  import * as i5$1 from 'ng-zorro-antd/date-picker';
32
32
  import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
33
- import { startOfWeek, subWeeks, endOfWeek, startOfMonth, endOfMonth, subMonths } from 'date-fns';
33
+ import { startOfWeek, endOfWeek, subWeeks, startOfMonth, endOfMonth, subMonths } from 'date-fns';
34
34
  import * as i6 from 'ng-zorro-antd/input-number';
35
35
  import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
36
36
  import * as i6$1 from 'ng-zorro-antd/input';
@@ -1795,11 +1795,11 @@ class ExtendDateRangePicker {
1795
1795
  _ngModel;
1796
1796
  today = new Date();
1797
1797
  ranges = {
1798
+ 'Tuần này': [startOfWeek(this.today, { weekStartsOn: 1 }), endOfWeek(this.today, { weekStartsOn: 1 })],
1798
1799
  'Tuần trước': [
1799
1800
  startOfWeek(subWeeks(this.today, 1), { weekStartsOn: 1 }),
1800
1801
  endOfWeek(subWeeks(this.today, 1), { weekStartsOn: 1 }),
1801
1802
  ],
1802
- 'Tuần này': [startOfWeek(this.today, { weekStartsOn: 1 }), endOfWeek(this.today, { weekStartsOn: 1 })],
1803
1803
  'Tháng này': [startOfMonth(this.today), endOfMonth(this.today)],
1804
1804
  'Tháng trước': [startOfMonth(subMonths(this.today, 1)), endOfMonth(subMonths(this.today, 1))],
1805
1805
  };
@@ -2145,7 +2145,13 @@ class ExtendSelectComponent {
2145
2145
  get cssHeight() {
2146
2146
  return this.inputHeight ? +this.inputHeight.replaceAll('px', '') - 1 + 'px' : null;
2147
2147
  }
2148
- ngOnInit() { }
2148
+ ngOnInit() {
2149
+ if (this.formData && this.controlName) {
2150
+ this.formData.controls[this.controlName].valueChanges.subscribe((val) => {
2151
+ this.itemChange.emit(this.lstItem.find((x) => x[this.valueField] == val));
2152
+ });
2153
+ }
2154
+ }
2149
2155
  getDisplay(item) {
2150
2156
  if (this.displayField) {
2151
2157
  return item[this.displayField];
@@ -2164,7 +2170,7 @@ class ExtendSelectComponent {
2164
2170
  this._ngModel = val;
2165
2171
  this._ngModelChange.emit(val);
2166
2172
  if (this.valueField) {
2167
- this.itemChange.emit(this.lstItem.find(x => x[this.valueField] == val));
2173
+ this.itemChange.emit(this.lstItem.find((x) => x[this.valueField] == val));
2168
2174
  }
2169
2175
  }
2170
2176
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ExtendSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });