@fuentis/phoenix-ui 0.0.9-alpha.578 → 0.0.9-alpha.579

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.
@@ -5744,207 +5744,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
5744
5744
  ] }]
5745
5745
  }], ctorParameters: () => [] });
5746
5746
 
5747
- class MetaStartDueDateComponent {
5748
- control;
5749
- parentForm;
5750
- ctrl;
5751
- dr = inject(DestroyRef);
5752
- startDate = null;
5753
- endDate = null;
5754
- onChanged = () => { };
5755
- onTouched = () => { };
5756
- ngOnInit() {
5757
- this.ctrl = this.parentForm.get(this.control.configuration.key);
5758
- if (this.control.mandatory)
5759
- this.ctrl?.setValidators(this.ctrl?.validator);
5760
- this.parentForm
5761
- .get(this.control.configuration.key)
5762
- ?.valueChanges.pipe(takeUntilDestroyed(this.dr))
5763
- .subscribe(() => this.validateDates());
5764
- this.validateDates();
5765
- }
5766
- normalizeDateOnly(v) {
5767
- if (!v)
5768
- return null;
5769
- const d = v instanceof Date ? v : new Date(v);
5770
- if (isNaN(d.getTime()))
5771
- return null;
5772
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
5773
- }
5774
- writeValue(obj) {
5775
- if (obj) {
5776
- this.startDate = this.normalizeDateOnly(obj.startDate);
5777
- this.endDate = this.normalizeDateOnly(obj.endDate);
5778
- }
5779
- else {
5780
- this.startDate = null;
5781
- this.endDate = null;
5782
- }
5783
- this.validateDates();
5784
- }
5785
- // Handle start date selection
5786
- onStartDateSelect(event) {
5787
- this.startDate = this.normalizeDateOnly(event);
5788
- this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5789
- this.validateDates();
5790
- }
5791
- // Handle end date selection
5792
- onEndDateSelect(event) {
5793
- this.endDate = this.normalizeDateOnly(event);
5794
- this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5795
- this.validateDates();
5796
- }
5797
- // Handle start date clear value
5798
- onStartDateClear() {
5799
- this.startDate = null;
5800
- this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5801
- this.validateDates();
5802
- }
5803
- // Handle end date clear value
5804
- onEndDateClear() {
5805
- this.endDate = null;
5806
- this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5807
- this.validateDates();
5808
- }
5809
- validateDates() {
5810
- const c = this.parentForm.get(this.control.configuration.key);
5811
- if (!c)
5812
- return;
5813
- // clear previous errors
5814
- c.setErrors(null);
5815
- // Both dates are mandatory
5816
- if (this.control.mandatory && (!this.startDate || !this.endDate)) {
5817
- c.setErrors({ required: true });
5818
- return;
5819
- }
5820
- if (this.startDate && this.endDate) {
5821
- const s = new Date(this.startDate.getFullYear(), this.startDate.getMonth(), this.startDate.getDate(), 12, 0, 0, 0).getTime();
5822
- const e = new Date(this.endDate.getFullYear(), this.endDate.getMonth(), this.endDate.getDate(), 12, 0, 0, 0).getTime();
5823
- if (s > e) {
5824
- c.setErrors({ dueDate: true });
5825
- return;
5826
- }
5827
- }
5828
- }
5829
- registerOnChange(fn) {
5830
- this.onChanged = fn;
5831
- }
5832
- registerOnTouched(fn) {
5833
- this.onTouched = fn;
5834
- }
5835
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5836
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateComponent, isStandalone: true, selector: "phoenix-meta-start-due-date", inputs: { control: "control", parentForm: "parentForm" }, providers: [
5837
- {
5838
- provide: NG_VALUE_ACCESSOR,
5839
- useExisting: forwardRef(() => MetaStartDueDateComponent),
5840
- multi: true,
5841
- },
5842
- ], ngImport: i0, template: `
5843
- <div [hidden]="control?.hidden">
5844
- <phoenix-meta-label [control]="control"></phoenix-meta-label>
5845
- <div class="flex">
5846
- <div class="flex-grow-1">
5847
- <p-datepicker
5848
- [attr.data-cy]="'start-date-' + control?.id"
5849
- (onSelect)="onStartDateSelect($event)"
5850
- (onClearClick)="onStartDateClear()"
5851
- [style]="{ width: '100%' }"
5852
- [(ngModel)]="startDate"
5853
- [readonlyInput]="true"
5854
- [showButtonBar]="true"
5855
- [showIcon]="true"
5856
- [placeholder]="'LABELS.PLANNED_START' | translate"
5857
- appendTo="body"
5858
- ></p-datepicker>
5859
- </div>
5860
- <div class=" flex align-items-center p-2 ">
5861
- <i
5862
- class="pi pi-arrow-right text-sm"
5863
- style="color: 'var(--surface-600)'"
5864
- ></i>
5865
- </div>
5866
- <div class="flex-grow-1">
5867
- <p-datepicker
5868
- [attr.data-cy]="'due-date-' + control?.id"
5869
- (onSelect)="onEndDateSelect($event)"
5870
- (onClearClick)="onEndDateClear()"
5871
- [style]="{ width: '100%' }"
5872
- [(ngModel)]="endDate"
5873
- [readonlyInput]="true"
5874
- [showButtonBar]="true"
5875
- [showIcon]="true"
5876
- [placeholder]="'LABELS.PLANNED_END' | translate"
5877
- appendTo="body"
5878
- ></p-datepicker>
5879
- </div>
5880
- </div>
5881
- <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
5882
- </div>
5883
- `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: InlineFieldError, selector: "phoenix-inline-field-error", inputs: ["ctrl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MetaLabelComponent, selector: "phoenix-meta-label", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
5884
- }
5885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, decorators: [{
5886
- type: Component,
5887
- args: [{ selector: 'phoenix-meta-start-due-date', standalone: true, imports: [
5888
- DatePickerModule,
5889
- InlineFieldError,
5890
- ReactiveFormsModule,
5891
- FormsModule,
5892
- MetaLabelComponent,
5893
- TranslateModule,
5894
- ], template: `
5895
- <div [hidden]="control?.hidden">
5896
- <phoenix-meta-label [control]="control"></phoenix-meta-label>
5897
- <div class="flex">
5898
- <div class="flex-grow-1">
5899
- <p-datepicker
5900
- [attr.data-cy]="'start-date-' + control?.id"
5901
- (onSelect)="onStartDateSelect($event)"
5902
- (onClearClick)="onStartDateClear()"
5903
- [style]="{ width: '100%' }"
5904
- [(ngModel)]="startDate"
5905
- [readonlyInput]="true"
5906
- [showButtonBar]="true"
5907
- [showIcon]="true"
5908
- [placeholder]="'LABELS.PLANNED_START' | translate"
5909
- appendTo="body"
5910
- ></p-datepicker>
5911
- </div>
5912
- <div class=" flex align-items-center p-2 ">
5913
- <i
5914
- class="pi pi-arrow-right text-sm"
5915
- style="color: 'var(--surface-600)'"
5916
- ></i>
5917
- </div>
5918
- <div class="flex-grow-1">
5919
- <p-datepicker
5920
- [attr.data-cy]="'due-date-' + control?.id"
5921
- (onSelect)="onEndDateSelect($event)"
5922
- (onClearClick)="onEndDateClear()"
5923
- [style]="{ width: '100%' }"
5924
- [(ngModel)]="endDate"
5925
- [readonlyInput]="true"
5926
- [showButtonBar]="true"
5927
- [showIcon]="true"
5928
- [placeholder]="'LABELS.PLANNED_END' | translate"
5929
- appendTo="body"
5930
- ></p-datepicker>
5931
- </div>
5932
- </div>
5933
- <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
5934
- </div>
5935
- `, providers: [
5936
- {
5937
- provide: NG_VALUE_ACCESSOR,
5938
- useExisting: forwardRef(() => MetaStartDueDateComponent),
5939
- multi: true,
5940
- },
5941
- ] }]
5942
- }], propDecorators: { control: [{
5943
- type: Input
5944
- }], parentForm: [{
5945
- type: Input
5946
- }] } });
5947
-
5948
5747
  class MetaSwitchComponent extends BaseMetaField {
5949
5748
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5950
5749
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaSwitchComponent, isStandalone: true, selector: "phoenix-meta-switch", providers: [
@@ -7424,6 +7223,208 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
7424
7223
  args: ['fileInput']
7425
7224
  }] } });
7426
7225
 
7226
+ class MetaStartDueDateComponent {
7227
+ control;
7228
+ parentForm;
7229
+ ctrl;
7230
+ dr = inject(DestroyRef);
7231
+ startDate;
7232
+ endDate;
7233
+ onChanged;
7234
+ onTouched;
7235
+ constructor() { }
7236
+ ngOnInit() {
7237
+ this.ctrl = this.parentForm.get(this.control.configuration.key);
7238
+ this.ctrl = this.parentForm.get(this.control.configuration.key);
7239
+ if (this.control.mandatory)
7240
+ this.ctrl.setValidators(this.ctrl.validator);
7241
+ this.parentForm
7242
+ .get(this.control.configuration.key)
7243
+ ?.valueChanges.pipe(takeUntilDestroyed(this.dr))
7244
+ .subscribe((r) => {
7245
+ this.validateDates();
7246
+ });
7247
+ this.validateDates();
7248
+ }
7249
+ writeValue(obj) {
7250
+ if (obj) {
7251
+ this.startDate = obj.startDate;
7252
+ this.endDate = obj.endDate;
7253
+ }
7254
+ else {
7255
+ this.startDate = null;
7256
+ this.endDate = null;
7257
+ }
7258
+ }
7259
+ // Handle start date selection
7260
+ onStartDateSelect(event) {
7261
+ this.startDate = event;
7262
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
7263
+ this.validateDates();
7264
+ }
7265
+ // Handle end date selection
7266
+ onEndDateSelect(event) {
7267
+ this.endDate = event;
7268
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
7269
+ this.validateDates();
7270
+ }
7271
+ // Handle start date clear value
7272
+ onStartDateClear() {
7273
+ this.startDate = null;
7274
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
7275
+ this.validateDates();
7276
+ }
7277
+ // Handle end date clear value
7278
+ onEndDateClear() {
7279
+ this.endDate = null;
7280
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
7281
+ this.validateDates();
7282
+ }
7283
+ validateDates() {
7284
+ //Both dates are mandatory
7285
+ if (this.control.mandatory && (!this.startDate || !this.endDate)) {
7286
+ this.parentForm
7287
+ .get(this.control.configuration.key)
7288
+ ?.setErrors({ required: true });
7289
+ }
7290
+ else {
7291
+ this.parentForm.get(this.control.configuration.key)?.setErrors(null);
7292
+ }
7293
+ // End date must be after start date
7294
+ if (this.startDate &&
7295
+ this.endDate &&
7296
+ this.startDate.setHours(0, 0, 0, 0) > this.endDate.setHours(0, 0, 0, 0)) {
7297
+ this.parentForm
7298
+ .get(this.control.configuration.key)
7299
+ ?.setErrors({ dueDate: true });
7300
+ }
7301
+ //TBD: Scenario if only one date is mandatory
7302
+ }
7303
+ registerOnChange(fn) {
7304
+ this.onChanged = fn;
7305
+ }
7306
+ registerOnTouched(fn) {
7307
+ this.onTouched = fn;
7308
+ }
7309
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7310
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateComponent, isStandalone: true, selector: "phoenix-meta-start-due-date", inputs: { control: "control", parentForm: "parentForm" }, providers: [
7311
+ {
7312
+ provide: NG_VALUE_ACCESSOR,
7313
+ useExisting: forwardRef(() => MetaStartDueDateComponent),
7314
+ multi: true,
7315
+ },
7316
+ ], ngImport: i0, template: `
7317
+ <div [hidden]="control?.hidden">
7318
+ <phoenix-meta-label [control]="control"></phoenix-meta-label>
7319
+
7320
+ <div class="flex align-items-center gap-2">
7321
+ <div class="flex-1">
7322
+ <p-datepicker
7323
+ [attr.data-cy]="'start-date-' + control?.id"
7324
+ (onSelect)="onStartDateSelect($event)"
7325
+ (onClearClick)="onStartDateClear()"
7326
+ [style]="{ width: '100%' }"
7327
+ [(ngModel)]="startDate"
7328
+ [ngModelOptions]="{ standalone: true }"
7329
+ [readonlyInput]="true"
7330
+ [showButtonBar]="true"
7331
+ [showIcon]="true"
7332
+ [placeholder]="'LABELS.PLANNED_START' | translate"
7333
+ appendTo="body"
7334
+ ></p-datepicker>
7335
+ </div>
7336
+
7337
+ <div class="flex align-items-center justify-content-center px-2" style="flex: 0 0 24px;">
7338
+ <i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
7339
+ </div>
7340
+
7341
+ <div class="flex-1">
7342
+ <p-datepicker
7343
+ [attr.data-cy]="'due-date-' + control?.id"
7344
+ (onSelect)="onEndDateSelect($event)"
7345
+ (onClearClick)="onEndDateClear()"
7346
+ [style]="{ width: '100%' }"
7347
+ [(ngModel)]="endDate"
7348
+ [ngModelOptions]="{ standalone: true }"
7349
+ [readonlyInput]="true"
7350
+ [showButtonBar]="true"
7351
+ [showIcon]="true"
7352
+ [placeholder]="'LABELS.PLANNED_END' | translate"
7353
+ appendTo="body"
7354
+ ></p-datepicker>
7355
+ </div>
7356
+ </div>
7357
+
7358
+ <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
7359
+ </div>
7360
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$6.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: InlineFieldError, selector: "phoenix-inline-field-error", inputs: ["ctrl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MetaLabelComponent, selector: "phoenix-meta-label", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
7361
+ }
7362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, decorators: [{
7363
+ type: Component,
7364
+ args: [{ selector: 'phoenix-meta-start-due-date', standalone: true, imports: [
7365
+ DatePickerModule,
7366
+ InlineFieldError,
7367
+ ReactiveFormsModule,
7368
+ FormsModule,
7369
+ MetaLabelComponent,
7370
+ TranslateModule,
7371
+ ], template: `
7372
+ <div [hidden]="control?.hidden">
7373
+ <phoenix-meta-label [control]="control"></phoenix-meta-label>
7374
+
7375
+ <div class="flex align-items-center gap-2">
7376
+ <div class="flex-1">
7377
+ <p-datepicker
7378
+ [attr.data-cy]="'start-date-' + control?.id"
7379
+ (onSelect)="onStartDateSelect($event)"
7380
+ (onClearClick)="onStartDateClear()"
7381
+ [style]="{ width: '100%' }"
7382
+ [(ngModel)]="startDate"
7383
+ [ngModelOptions]="{ standalone: true }"
7384
+ [readonlyInput]="true"
7385
+ [showButtonBar]="true"
7386
+ [showIcon]="true"
7387
+ [placeholder]="'LABELS.PLANNED_START' | translate"
7388
+ appendTo="body"
7389
+ ></p-datepicker>
7390
+ </div>
7391
+
7392
+ <div class="flex align-items-center justify-content-center px-2" style="flex: 0 0 24px;">
7393
+ <i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
7394
+ </div>
7395
+
7396
+ <div class="flex-1">
7397
+ <p-datepicker
7398
+ [attr.data-cy]="'due-date-' + control?.id"
7399
+ (onSelect)="onEndDateSelect($event)"
7400
+ (onClearClick)="onEndDateClear()"
7401
+ [style]="{ width: '100%' }"
7402
+ [(ngModel)]="endDate"
7403
+ [ngModelOptions]="{ standalone: true }"
7404
+ [readonlyInput]="true"
7405
+ [showButtonBar]="true"
7406
+ [showIcon]="true"
7407
+ [placeholder]="'LABELS.PLANNED_END' | translate"
7408
+ appendTo="body"
7409
+ ></p-datepicker>
7410
+ </div>
7411
+ </div>
7412
+
7413
+ <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
7414
+ </div>
7415
+ `, providers: [
7416
+ {
7417
+ provide: NG_VALUE_ACCESSOR,
7418
+ useExisting: forwardRef(() => MetaStartDueDateComponent),
7419
+ multi: true,
7420
+ },
7421
+ ] }]
7422
+ }], ctorParameters: () => [], propDecorators: { control: [{
7423
+ type: Input
7424
+ }], parentForm: [{
7425
+ type: Input
7426
+ }] } });
7427
+
7427
7428
  class MetaFormComponent extends MetaFormAbstract {
7428
7429
  constructor(fb, metaService, translateService, http
7429
7430
  // env: EnvService
@@ -8753,8 +8754,8 @@ class MetaStartDueDateV2Component {
8753
8754
  * NOTE: "YYYY-MM-DD" strings are parsed as local dates to avoid timezone day-shifts.
8754
8755
  */
8755
8756
  writeValue(v) {
8756
- this.startDate = this.normalizeDateOnly(this.parseToDate(v?.startDate ?? null));
8757
- this.endDate = this.normalizeDateOnly(this.parseToDate(v?.endDate ?? null));
8757
+ this.startDate = this.parseToDate(v?.startDate ?? null);
8758
+ this.endDate = this.parseToDate(v?.endDate ?? null);
8758
8759
  // OnPush: ensure UI reflects external value writes (patchValue/setValue)
8759
8760
  this.cdr.markForCheck();
8760
8761
  }
@@ -8794,7 +8795,7 @@ class MetaStartDueDateV2Component {
8794
8795
  onStartChange(d) {
8795
8796
  if (this.disabled)
8796
8797
  return;
8797
- this.startDate = this.normalizeDateOnly(d ?? null);
8798
+ this.startDate = d ?? null;
8798
8799
  this.emitChange();
8799
8800
  }
8800
8801
  /**
@@ -8804,7 +8805,7 @@ class MetaStartDueDateV2Component {
8804
8805
  onEndChange(d) {
8805
8806
  if (this.disabled)
8806
8807
  return;
8807
- this.endDate = this.normalizeDateOnly(d ?? null);
8808
+ this.endDate = d ?? null;
8808
8809
  this.emitChange();
8809
8810
  }
8810
8811
  /**
@@ -8843,20 +8844,13 @@ class MetaStartDueDateV2Component {
8843
8844
  const y = Number(m[1]);
8844
8845
  const mo = Number(m[2]) - 1;
8845
8846
  const d = Number(m[3]);
8846
- const local = new Date(y, mo, d, 12, 0, 0, 0);
8847
+ const local = new Date(y, mo, d);
8847
8848
  return isNaN(local.getTime()) ? null : local;
8848
8849
  }
8849
8850
  // ISO / other -> fallback
8850
8851
  const dt = new Date(s);
8851
8852
  return isNaN(dt.getTime()) ? null : dt;
8852
8853
  }
8853
- normalizeDateOnly(d) {
8854
- if (!d)
8855
- return null;
8856
- if (isNaN(d.getTime()))
8857
- return null;
8858
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
8859
- }
8860
8854
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
8861
8855
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaStartDueDateV2Component, isStandalone: true, selector: "phoenix-meta-start-due-date-v2", inputs: { dataCy: "dataCy", disable: "disable" }, providers: [
8862
8856
  {