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

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.
@@ -5088,6 +5088,7 @@ class MetaPasswordFeildComponent extends BaseMetaField {
5088
5088
  [feedback]="false"
5089
5089
  (input)="onChanged(getInputValue($event))"
5090
5090
  class="ng-invalid ng-dirty"
5091
+ autocomplete="new-password"
5091
5092
  ></p-password>
5092
5093
 
5093
5094
  @if (!control?.hidden) {
@@ -5118,6 +5119,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
5118
5119
  [feedback]="false"
5119
5120
  (input)="onChanged(getInputValue($event))"
5120
5121
  class="ng-invalid ng-dirty"
5122
+ autocomplete="new-password"
5121
5123
  ></p-password>
5122
5124
 
5123
5125
  @if (!control?.hidden) {
@@ -5744,6 +5746,223 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
5744
5746
  ] }]
5745
5747
  }], ctorParameters: () => [] });
5746
5748
 
5749
+ class MetaStartDueDateComponent {
5750
+ control;
5751
+ parentForm;
5752
+ ctrl;
5753
+ dr = inject(DestroyRef);
5754
+ startDate = null;
5755
+ endDate = null;
5756
+ onChanged = () => { };
5757
+ onTouched = () => { };
5758
+ ngOnInit() {
5759
+ this.ctrl = this.parentForm.get(this.control.configuration.key);
5760
+ if (this.control.mandatory)
5761
+ this.ctrl?.setValidators(this.ctrl?.validator);
5762
+ this.parentForm
5763
+ .get(this.control.configuration.key)
5764
+ ?.valueChanges.pipe(takeUntilDestroyed(this.dr))
5765
+ .subscribe(() => this.validateDates());
5766
+ this.validateDates();
5767
+ }
5768
+ normalizeDateOnly(v) {
5769
+ if (!v)
5770
+ return null;
5771
+ const d = v instanceof Date ? v : new Date(v);
5772
+ if (isNaN(d.getTime()))
5773
+ return null;
5774
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
5775
+ }
5776
+ writeValue(obj) {
5777
+ if (obj) {
5778
+ this.startDate = this.normalizeDateOnly(obj.startDate);
5779
+ this.endDate = this.normalizeDateOnly(obj.endDate);
5780
+ }
5781
+ else {
5782
+ this.startDate = null;
5783
+ this.endDate = null;
5784
+ }
5785
+ this.validateDates();
5786
+ }
5787
+ // Handle start date selection
5788
+ onStartDateSelect(event) {
5789
+ this.startDate = this.normalizeDateOnly(event);
5790
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5791
+ this.validateDates();
5792
+ }
5793
+ // Handle end date selection
5794
+ onEndDateSelect(event) {
5795
+ this.endDate = this.normalizeDateOnly(event);
5796
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5797
+ this.validateDates();
5798
+ }
5799
+ // Handle start date clear value
5800
+ onStartDateClear() {
5801
+ this.startDate = null;
5802
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5803
+ this.validateDates();
5804
+ }
5805
+ // Handle end date clear value
5806
+ onEndDateClear() {
5807
+ this.endDate = null;
5808
+ this.onChanged({ startDate: this.startDate, endDate: this.endDate });
5809
+ this.validateDates();
5810
+ }
5811
+ validateDates() {
5812
+ const c = this.parentForm.get(this.control.configuration.key);
5813
+ if (!c)
5814
+ return;
5815
+ // clear previous errors
5816
+ c.setErrors(null);
5817
+ // Both dates are mandatory
5818
+ if (this.control.mandatory && (!this.startDate || !this.endDate)) {
5819
+ c.setErrors({ required: true });
5820
+ return;
5821
+ }
5822
+ if (this.startDate && this.endDate) {
5823
+ const s = new Date(this.startDate.getFullYear(), this.startDate.getMonth(), this.startDate.getDate(), 12, 0, 0, 0).getTime();
5824
+ const e = new Date(this.endDate.getFullYear(), this.endDate.getMonth(), this.endDate.getDate(), 12, 0, 0, 0).getTime();
5825
+ if (s > e) {
5826
+ c.setErrors({ dueDate: true });
5827
+ return;
5828
+ }
5829
+ }
5830
+ }
5831
+ registerOnChange(fn) {
5832
+ this.onChanged = fn;
5833
+ }
5834
+ registerOnTouched(fn) {
5835
+ this.onTouched = fn;
5836
+ }
5837
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5838
+ 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: [
5839
+ {
5840
+ provide: NG_VALUE_ACCESSOR,
5841
+ useExisting: forwardRef(() => MetaStartDueDateComponent),
5842
+ multi: true,
5843
+ },
5844
+ ], ngImport: i0, template: `
5845
+ <div [hidden]="control?.hidden">
5846
+ <phoenix-meta-label [control]="control"></phoenix-meta-label>
5847
+
5848
+ <div class="flex align-items-center gap-2 w-full">
5849
+ <!-- START -->
5850
+ <div class="flex-1" style="min-width: 0;">
5851
+ <p-datepicker
5852
+ class="w-full"
5853
+ [inputStyle]="{ width: '100%' }"
5854
+ [attr.data-cy]="'start-date-' + control?.id"
5855
+ (onSelect)="onStartDateSelect($event)"
5856
+ (onClearClick)="onStartDateClear()"
5857
+ [(ngModel)]="startDate"
5858
+ [ngModelOptions]="{ standalone: true }"
5859
+ [readonlyInput]="true"
5860
+ [showButtonBar]="true"
5861
+ [showIcon]="true"
5862
+ [placeholder]="'LABELS.PLANNED_START' | translate"
5863
+ appendTo="body"
5864
+ ></p-datepicker>
5865
+ </div>
5866
+
5867
+ <!-- ARROW -->
5868
+ <div class="flex align-items-center justify-content-center" style="flex: 0 0 18px;">
5869
+ <i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
5870
+ </div>
5871
+
5872
+ <!-- DUE -->
5873
+ <div class="flex-1" style="min-width: 0;">
5874
+ <p-datepicker
5875
+ class="w-full"
5876
+ [inputStyle]="{ width: '100%' }"
5877
+ [attr.data-cy]="'due-date-' + control?.id"
5878
+ (onSelect)="onEndDateSelect($event)"
5879
+ (onClearClick)="onEndDateClear()"
5880
+ [(ngModel)]="endDate"
5881
+ [ngModelOptions]="{ standalone: true }"
5882
+ [readonlyInput]="true"
5883
+ [showButtonBar]="true"
5884
+ [showIcon]="true"
5885
+ [placeholder]="'LABELS.PLANNED_END' | translate"
5886
+ appendTo="body"
5887
+ ></p-datepicker>
5888
+ </div>
5889
+ </div>
5890
+
5891
+ <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
5892
+ </div>
5893
+ `, 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" }] });
5894
+ }
5895
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateComponent, decorators: [{
5896
+ type: Component,
5897
+ args: [{ selector: 'phoenix-meta-start-due-date', standalone: true, imports: [
5898
+ DatePickerModule,
5899
+ InlineFieldError,
5900
+ ReactiveFormsModule,
5901
+ FormsModule,
5902
+ MetaLabelComponent,
5903
+ TranslateModule,
5904
+ ], template: `
5905
+ <div [hidden]="control?.hidden">
5906
+ <phoenix-meta-label [control]="control"></phoenix-meta-label>
5907
+
5908
+ <div class="flex align-items-center gap-2 w-full">
5909
+ <!-- START -->
5910
+ <div class="flex-1" style="min-width: 0;">
5911
+ <p-datepicker
5912
+ class="w-full"
5913
+ [inputStyle]="{ width: '100%' }"
5914
+ [attr.data-cy]="'start-date-' + control?.id"
5915
+ (onSelect)="onStartDateSelect($event)"
5916
+ (onClearClick)="onStartDateClear()"
5917
+ [(ngModel)]="startDate"
5918
+ [ngModelOptions]="{ standalone: true }"
5919
+ [readonlyInput]="true"
5920
+ [showButtonBar]="true"
5921
+ [showIcon]="true"
5922
+ [placeholder]="'LABELS.PLANNED_START' | translate"
5923
+ appendTo="body"
5924
+ ></p-datepicker>
5925
+ </div>
5926
+
5927
+ <!-- ARROW -->
5928
+ <div class="flex align-items-center justify-content-center" style="flex: 0 0 18px;">
5929
+ <i class="pi pi-arrow-right text-sm" style="color: var(--surface-600)"></i>
5930
+ </div>
5931
+
5932
+ <!-- DUE -->
5933
+ <div class="flex-1" style="min-width: 0;">
5934
+ <p-datepicker
5935
+ class="w-full"
5936
+ [inputStyle]="{ width: '100%' }"
5937
+ [attr.data-cy]="'due-date-' + control?.id"
5938
+ (onSelect)="onEndDateSelect($event)"
5939
+ (onClearClick)="onEndDateClear()"
5940
+ [(ngModel)]="endDate"
5941
+ [ngModelOptions]="{ standalone: true }"
5942
+ [readonlyInput]="true"
5943
+ [showButtonBar]="true"
5944
+ [showIcon]="true"
5945
+ [placeholder]="'LABELS.PLANNED_END' | translate"
5946
+ appendTo="body"
5947
+ ></p-datepicker>
5948
+ </div>
5949
+ </div>
5950
+
5951
+ <phoenix-inline-field-error [ctrl]="ctrl"></phoenix-inline-field-error>
5952
+ </div>
5953
+ `, providers: [
5954
+ {
5955
+ provide: NG_VALUE_ACCESSOR,
5956
+ useExisting: forwardRef(() => MetaStartDueDateComponent),
5957
+ multi: true,
5958
+ },
5959
+ ] }]
5960
+ }], propDecorators: { control: [{
5961
+ type: Input
5962
+ }], parentForm: [{
5963
+ type: Input
5964
+ }] } });
5965
+
5747
5966
  class MetaSwitchComponent extends BaseMetaField {
5748
5967
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5749
5968
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: MetaSwitchComponent, isStandalone: true, selector: "phoenix-meta-switch", providers: [
@@ -7223,208 +7442,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
7223
7442
  args: ['fileInput']
7224
7443
  }] } });
7225
7444
 
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
-
7428
7445
  class MetaFormComponent extends MetaFormAbstract {
7429
7446
  constructor(fb, metaService, translateService, http
7430
7447
  // env: EnvService
@@ -8754,8 +8771,8 @@ class MetaStartDueDateV2Component {
8754
8771
  * NOTE: "YYYY-MM-DD" strings are parsed as local dates to avoid timezone day-shifts.
8755
8772
  */
8756
8773
  writeValue(v) {
8757
- this.startDate = this.parseToDate(v?.startDate ?? null);
8758
- this.endDate = this.parseToDate(v?.endDate ?? null);
8774
+ this.startDate = this.normalizeDateOnly(this.parseToDate(v?.startDate ?? null));
8775
+ this.endDate = this.normalizeDateOnly(this.parseToDate(v?.endDate ?? null));
8759
8776
  // OnPush: ensure UI reflects external value writes (patchValue/setValue)
8760
8777
  this.cdr.markForCheck();
8761
8778
  }
@@ -8795,7 +8812,7 @@ class MetaStartDueDateV2Component {
8795
8812
  onStartChange(d) {
8796
8813
  if (this.disabled)
8797
8814
  return;
8798
- this.startDate = d ?? null;
8815
+ this.startDate = this.normalizeDateOnly(d ?? null);
8799
8816
  this.emitChange();
8800
8817
  }
8801
8818
  /**
@@ -8805,7 +8822,7 @@ class MetaStartDueDateV2Component {
8805
8822
  onEndChange(d) {
8806
8823
  if (this.disabled)
8807
8824
  return;
8808
- this.endDate = d ?? null;
8825
+ this.endDate = this.normalizeDateOnly(d ?? null);
8809
8826
  this.emitChange();
8810
8827
  }
8811
8828
  /**
@@ -8844,13 +8861,20 @@ class MetaStartDueDateV2Component {
8844
8861
  const y = Number(m[1]);
8845
8862
  const mo = Number(m[2]) - 1;
8846
8863
  const d = Number(m[3]);
8847
- const local = new Date(y, mo, d);
8864
+ const local = new Date(y, mo, d, 12, 0, 0, 0);
8848
8865
  return isNaN(local.getTime()) ? null : local;
8849
8866
  }
8850
8867
  // ISO / other -> fallback
8851
8868
  const dt = new Date(s);
8852
8869
  return isNaN(dt.getTime()) ? null : dt;
8853
8870
  }
8871
+ normalizeDateOnly(d) {
8872
+ if (!d)
8873
+ return null;
8874
+ if (isNaN(d.getTime()))
8875
+ return null;
8876
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate(), 12, 0, 0, 0);
8877
+ }
8854
8878
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MetaStartDueDateV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
8855
8879
  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: [
8856
8880
  {