@solcre-org/core-ui 2.20.26 → 2.20.28

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.
@@ -1,17 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Directive, input, Component, inject, output, computed, signal, effect, HostListener, ViewChild, ViewEncapsulation, Pipe, Injectable, ElementRef, untracked, ViewContainerRef, TemplateRef, InjectionToken, ContentChild, ChangeDetectionStrategy, viewChild, ChangeDetectorRef, afterNextRender, makeEnvironmentProviders, importProvidersFrom } from '@angular/core';
2
+ import { HostBinding, Directive, input, Component, inject, output, computed, signal, effect, ElementRef, HostListener, ViewChild, ViewEncapsulation, Pipe, Injectable, untracked, ViewContainerRef, TemplateRef, InjectionToken, ContentChild, ChangeDetectionStrategy, viewChild, ChangeDetectorRef, afterNextRender, makeEnvironmentProviders, importProvidersFrom } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule, DatePipe } from '@angular/common';
5
5
  import * as i3 from '@ngx-translate/core';
6
6
  import { TranslateModule, TranslateService, TranslateLoader } from '@ngx-translate/core';
7
7
  import * as i3$1 from '@angular/forms';
8
8
  import { FormControl, Validators, FormsModule, ReactiveFormsModule, FormBuilder } from '@angular/forms';
9
- import * as i5 from '@ng-select/ng-select';
10
- import { NgSelectModule } from '@ng-select/ng-select';
11
9
  import { AuthService, ApiService } from '@solcre-org/core';
12
10
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
11
  import { distinctUntilChanged, debounceTime, tap as tap$1, map as map$1, filter, catchError as catchError$1 } from 'rxjs/operators';
14
12
  import { map, BehaviorSubject, Subject, throttleTime, takeUntil, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, tap, switchMap, of, catchError, finalize, throwError, Observable, forkJoin, zip, timeout, Subscription, from } from 'rxjs';
13
+ import * as i5 from '@ng-select/ng-select';
14
+ import { NgSelectModule } from '@ng-select/ng-select';
15
15
  import * as i4 from '@angular/router';
16
16
  import { RouterModule, Router, NavigationEnd, NavigationStart } from '@angular/router';
17
17
  import { DomSanitizer } from '@angular/platform-browser';
@@ -1062,6 +1062,7 @@ var TimeInterval;
1062
1062
  })(TimeInterval || (TimeInterval = {}));
1063
1063
 
1064
1064
  class DatetimeFieldComponent {
1065
+ el = inject(ElementRef);
1065
1066
  field = input.required();
1066
1067
  value = input(null);
1067
1068
  mode = input.required();
@@ -1076,9 +1077,20 @@ class DatetimeFieldComponent {
1076
1077
  selectedDate = signal(null);
1077
1078
  selectedHour = signal(null);
1078
1079
  selectedMinute = signal(null);
1080
+ isHourOpen = signal(false);
1081
+ isMinuteOpen = signal(false);
1082
+ highlightedHourIndex = signal(-1);
1083
+ highlightedMinuteIndex = signal(-1);
1079
1084
  hasHourValue = signal(false);
1080
1085
  hasMinuteValue = signal(false);
1081
1086
  hours = Array.from({ length: 24 }, (_, i) => i);
1087
+ onDocumentClick(event) {
1088
+ if (!this.el.nativeElement.contains(event.target)) {
1089
+ this.isHourOpen.set(false);
1090
+ this.isMinuteOpen.set(false);
1091
+ this.onBlur();
1092
+ }
1093
+ }
1082
1094
  isHourPlaceholderVisible = computed(() => {
1083
1095
  const hasVal = this.hasHourValue();
1084
1096
  return !hasVal;
@@ -1148,6 +1160,9 @@ class DatetimeFieldComponent {
1148
1160
  return true;
1149
1161
  return this.evaluateReadonly();
1150
1162
  });
1163
+ isTimeDisabled = computed(() => {
1164
+ return this.isDisabled() || !this.selectedDate();
1165
+ });
1151
1166
  hasError = computed(() => {
1152
1167
  return this.errors().length > 0;
1153
1168
  });
@@ -1173,7 +1188,6 @@ class DatetimeFieldComponent {
1173
1188
  this.selectedMinute.set(this.roundToNearestInterval(newDate).getMinutes());
1174
1189
  }
1175
1190
  });
1176
- // Update hasValue signals when selected values change
1177
1191
  effect(() => {
1178
1192
  const hour = this.selectedHour();
1179
1193
  this.hasHourValue.set(hour !== null && hour !== undefined);
@@ -1239,7 +1253,6 @@ class DatetimeFieldComponent {
1239
1253
  const input = event.target;
1240
1254
  const newDate = input.value ? new Date(input.value + 'T00:00:00') : null;
1241
1255
  if (newDate && !isNaN(newDate.getTime())) {
1242
- // If hour/minute not set, default to 0
1243
1256
  const currentHour = this.selectedHour() ?? 0;
1244
1257
  const currentMinute = this.selectedMinute() ?? 0;
1245
1258
  this.selectedHour.set(currentHour);
@@ -1252,8 +1265,6 @@ class DatetimeFieldComponent {
1252
1265
  this.emitValue();
1253
1266
  }
1254
1267
  else {
1255
- //If date is cleared, clear everything? Or just date?
1256
- //Usually if date input is cleared, value is null.
1257
1268
  this.selectedDate.set(null);
1258
1269
  this.emitValue();
1259
1270
  }
@@ -1266,15 +1277,47 @@ class DatetimeFieldComponent {
1266
1277
  this.selectedMinute.set(value);
1267
1278
  this.emitValue();
1268
1279
  }
1280
+ toggleHourDropdown(event) {
1281
+ if (this.isTimeDisabled())
1282
+ return;
1283
+ event.stopPropagation();
1284
+ const opening = !this.isHourOpen();
1285
+ this.isHourOpen.set(opening);
1286
+ this.isMinuteOpen.set(false);
1287
+ if (opening) {
1288
+ const idx = this.hoursOptions().findIndex(o => o.value === this.selectedHour());
1289
+ this.highlightedHourIndex.set(idx >= 0 ? idx : -1);
1290
+ }
1291
+ }
1292
+ toggleMinuteDropdown(event) {
1293
+ if (this.isTimeDisabled())
1294
+ return;
1295
+ event.stopPropagation();
1296
+ const opening = !this.isMinuteOpen();
1297
+ this.isMinuteOpen.set(opening);
1298
+ this.isHourOpen.set(false);
1299
+ if (opening) {
1300
+ const idx = this.minutesOptions().findIndex(o => o.value === this.selectedMinute());
1301
+ this.highlightedMinuteIndex.set(idx >= 0 ? idx : -1);
1302
+ }
1303
+ }
1304
+ selectHourOption(value, event) {
1305
+ event.stopPropagation();
1306
+ this.onHourChange(value);
1307
+ this.isHourOpen.set(false);
1308
+ }
1309
+ selectMinuteOption(value, event) {
1310
+ event.stopPropagation();
1311
+ this.onMinuteChange(value);
1312
+ this.isMinuteOpen.set(false);
1313
+ }
1269
1314
  emitValue() {
1270
1315
  const date = this.selectedDate();
1271
- // If no date selected, value is null regardless of time
1272
1316
  if (!date || isNaN(date.getTime())) {
1273
1317
  this.valueChange.emit(null);
1274
1318
  return;
1275
1319
  }
1276
1320
  const newDate = new Date(date.getTime());
1277
- // Use 0 if time not selected yet but date is present
1278
1321
  newDate.setHours(this.selectedHour() ?? 0);
1279
1322
  newDate.setMinutes(this.selectedMinute() ?? 0);
1280
1323
  newDate.setSeconds(0);
@@ -1313,6 +1356,13 @@ class DatetimeFieldComponent {
1313
1356
  onBlur() {
1314
1357
  this.onBlurEvent.emit(this.field().key);
1315
1358
  }
1359
+ onDateInputBlur() {
1360
+ setTimeout(() => {
1361
+ if (!this.el.nativeElement.contains(document.activeElement)) {
1362
+ this.onBlur();
1363
+ }
1364
+ }, 200);
1365
+ }
1316
1366
  onEnter(event) {
1317
1367
  this.onEnterEvent.emit(this.field().key);
1318
1368
  const target = event.target;
@@ -1331,12 +1381,15 @@ class DatetimeFieldComponent {
1331
1381
  }
1332
1382
  }
1333
1383
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: DatetimeFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1334
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: DatetimeFieldComponent, isStandalone: true, selector: "core-datetime-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, formValue: { classPropertyName: "formValue", publicName: "formValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", onBlurEvent: "onBlurEvent", onEnterEvent: "onEnterEvent" }, usesOnChanges: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n <label class=\"c-entry-text\" *ngIf=\"field().label\" [for]=\"field().key.toString()\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </label>\n <div class=\"c-entry-datetime\">\n <span class=\"c-entry-input\" [class.is-invalid]=\"hasError()\">\n <input\n type=\"date\"\n [id]=\"field().key.toString()\"\n [name]=\"field().key.toString()\"\n [value]=\"formattedDate()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onDateChange($event)\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"onEnter($any($event))\"\n />\n <button class=\"c-entry-input__addon icon-calendar-thin\" \n tabindex=\"-1\"\n type=\"button\"\n (click)=\"onCalendarClick($event)\"></button>\n </span>\n <span class=\"c-entry-input c-entry-input--ng-select\" [class.is-invalid]=\"hasError()\">\n <ng-select\n [items]=\"hoursOptions()\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [ngModel]=\"selectedHour()\"\n (ngModelChange)=\"onHourChange($event)\"\n [disabled]=\"isDisabled()\"\n [clearable]=\"false\"\n [searchable]=\"false\"\n (blur)=\"onBlur()\"\n [placeholder]=\"isHourPlaceholderVisible() ? 'HH' : ''\"\n >\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n <ng-template ng-label-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n </ng-select>\n <span class=\"c-entry-input__addon icon-select-arrow\"></span>\n </span>\n <span class=\"c-entry-datetime__separator\">:</span>\n <span class=\"c-entry-input c-entry-input--ng-select\" [class.is-invalid]=\"hasError()\">\n <ng-select\n [items]=\"minutesOptions()\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [ngModel]=\"selectedMinute()\"\n (ngModelChange)=\"onMinuteChange($event)\"\n [disabled]=\"isDisabled()\"\n [clearable]=\"false\"\n [searchable]=\"false\"\n (blur)=\"onBlur()\"\n [placeholder]=\"isMinutePlaceholderVisible() ? 'MM' : ''\"\n >\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n <ng-template ng-label-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n </ng-select>\n <span class=\"c-entry-input__addon icon-select-arrow\"></span>\n </span>\n </div>\n <core-field-errors [errors]=\"errors()\" />\n</div>\n\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i5.NgLabelTemplateDirective, selector: "[ng-label-tmp]" }, { kind: "component", type: FieldErrorsComponent, selector: "core-field-errors", inputs: ["errors"] }] });
1384
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: DatetimeFieldComponent, isStandalone: true, selector: "core-datetime-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, rowData: { classPropertyName: "rowData", publicName: "rowData", isSignal: true, isRequired: false, transformFunction: null }, formValue: { classPropertyName: "formValue", publicName: "formValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", onBlurEvent: "onBlurEvent", onEnterEvent: "onEnterEvent" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, usesOnChanges: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<div class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n <label class=\"c-entry-text\" *ngIf=\"field().label\" [for]=\"field().key.toString()\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </label>\n <div class=\"c-entry-datetime\">\n <span class=\"c-entry-input\" [class.is-invalid]=\"hasError()\">\n <input\n type=\"date\"\n [id]=\"field().key.toString()\"\n [name]=\"field().key.toString()\"\n [value]=\"formattedDate()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onDateChange($event)\"\n (blur)=\"onDateInputBlur()\"\n (keydown.enter)=\"onEnter($any($event))\"\n />\n <button class=\"c-entry-input__addon icon-calendar-thin\" \n tabindex=\"-1\"\n type=\"button\"\n (click)=\"onCalendarClick($event)\"></button>\n </span>\n <span class=\"c-entry-input c-entry-input--native-select\"\n [class.is-placeholder]=\"isHourPlaceholderVisible()\"\n [class.is-open]=\"isHourOpen()\"\n [class.has-value]=\"!isHourPlaceholderVisible()\"\n [class.is-disabled]=\"isTimeDisabled()\"\n >\n <div class=\"c-native-select__control\" (click)=\"toggleHourDropdown($event)\">\n @if (selectedHour() !== null && selectedHour() !== undefined) {\n <span class=\"c-native-select__single-value\">{{ selectedHour()!.toString().padStart(2, '0') }}</span>\n } @else {\n <span class=\"c-native-select__placeholder\">HH</span>\n }\n </div>\n <span\n class=\"c-entry-input__addon icon-select-arrow\"\n [class.is-flipped]=\"isHourOpen()\"\n (click)=\"toggleHourDropdown($event)\"\n ></span>\n @if (isHourOpen()) {\n <div class=\"c-native-select__dropdown\">\n <div class=\"c-native-select__options\">\n @for (option of hoursOptions(); track option.value; let i = $index) {\n <div\n class=\"c-native-select__option\"\n [class.is-selected]=\"selectedHour() === option.value\"\n [class.is-highlighted]=\"highlightedHourIndex() === i\"\n (click)=\"selectHourOption(option.value, $event)\"\n (mouseenter)=\"highlightedHourIndex.set(i)\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </span>\n <span class=\"c-entry-datetime__separator\">:</span>\n <span class=\"c-entry-input c-entry-input--native-select\"\n [class.is-placeholder]=\"isMinutePlaceholderVisible()\"\n [class.is-open]=\"isMinuteOpen()\"\n [class.has-value]=\"!isMinutePlaceholderVisible()\"\n [class.is-disabled]=\"isTimeDisabled()\"\n >\n <div class=\"c-native-select__control\" (click)=\"toggleMinuteDropdown($event)\">\n @if (selectedMinute() !== null && selectedMinute() !== undefined) {\n <span class=\"c-native-select__single-value\">{{ selectedMinute()!.toString().padStart(2, '0') }}</span>\n } @else {\n <span class=\"c-native-select__placeholder\">MM</span>\n }\n </div>\n <span\n class=\"c-entry-input__addon icon-select-arrow\"\n [class.is-flipped]=\"isMinuteOpen()\"\n (click)=\"toggleMinuteDropdown($event)\"\n ></span>\n @if (isMinuteOpen()) {\n <div class=\"c-native-select__dropdown\">\n <div class=\"c-native-select__options\">\n @for (option of minutesOptions(); track option.value; let i = $index) {\n <div\n class=\"c-native-select__option\"\n [class.is-selected]=\"selectedMinute() === option.value\"\n [class.is-highlighted]=\"highlightedMinuteIndex() === i\"\n (click)=\"selectMinuteOption(option.value, $event)\"\n (mouseenter)=\"highlightedMinuteIndex.set(i)\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </span>\n </div>\n <core-field-errors [errors]=\"errors()\" />\n</div>\n\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: FieldErrorsComponent, selector: "core-field-errors", inputs: ["errors"] }] });
1335
1385
  }
1336
1386
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: DatetimeFieldComponent, decorators: [{
1337
1387
  type: Component,
1338
- args: [{ selector: 'core-datetime-field', standalone: true, imports: [CommonModule, FormsModule, TranslateModule, ReactiveFormsModule, NgSelectModule, FieldErrorsComponent], hostDirectives: [CoreHostDirective], template: "<div class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n <label class=\"c-entry-text\" *ngIf=\"field().label\" [for]=\"field().key.toString()\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </label>\n <div class=\"c-entry-datetime\">\n <span class=\"c-entry-input\" [class.is-invalid]=\"hasError()\">\n <input\n type=\"date\"\n [id]=\"field().key.toString()\"\n [name]=\"field().key.toString()\"\n [value]=\"formattedDate()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onDateChange($event)\"\n (blur)=\"onBlur()\"\n (keydown.enter)=\"onEnter($any($event))\"\n />\n <button class=\"c-entry-input__addon icon-calendar-thin\" \n tabindex=\"-1\"\n type=\"button\"\n (click)=\"onCalendarClick($event)\"></button>\n </span>\n <span class=\"c-entry-input c-entry-input--ng-select\" [class.is-invalid]=\"hasError()\">\n <ng-select\n [items]=\"hoursOptions()\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [ngModel]=\"selectedHour()\"\n (ngModelChange)=\"onHourChange($event)\"\n [disabled]=\"isDisabled()\"\n [clearable]=\"false\"\n [searchable]=\"false\"\n (blur)=\"onBlur()\"\n [placeholder]=\"isHourPlaceholderVisible() ? 'HH' : ''\"\n >\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n <ng-template ng-label-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n </ng-select>\n <span class=\"c-entry-input__addon icon-select-arrow\"></span>\n </span>\n <span class=\"c-entry-datetime__separator\">:</span>\n <span class=\"c-entry-input c-entry-input--ng-select\" [class.is-invalid]=\"hasError()\">\n <ng-select\n [items]=\"minutesOptions()\"\n bindValue=\"value\"\n bindLabel=\"label\"\n [ngModel]=\"selectedMinute()\"\n (ngModelChange)=\"onMinuteChange($event)\"\n [disabled]=\"isDisabled()\"\n [clearable]=\"false\"\n [searchable]=\"false\"\n (blur)=\"onBlur()\"\n [placeholder]=\"isMinutePlaceholderVisible() ? 'MM' : ''\"\n >\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n <ng-template ng-label-tmp let-item=\"item\">\n {{ item.label }}\n </ng-template>\n </ng-select>\n <span class=\"c-entry-input__addon icon-select-arrow\"></span>\n </span>\n </div>\n <core-field-errors [errors]=\"errors()\" />\n</div>\n\n\n" }]
1339
- }], ctorParameters: () => [] });
1388
+ args: [{ selector: 'core-datetime-field', standalone: true, imports: [CommonModule, FormsModule, TranslateModule, ReactiveFormsModule, FieldErrorsComponent], hostDirectives: [CoreHostDirective], template: "<div class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n <label class=\"c-entry-text\" *ngIf=\"field().label\" [for]=\"field().key.toString()\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </label>\n <div class=\"c-entry-datetime\">\n <span class=\"c-entry-input\" [class.is-invalid]=\"hasError()\">\n <input\n type=\"date\"\n [id]=\"field().key.toString()\"\n [name]=\"field().key.toString()\"\n [value]=\"formattedDate()\"\n [disabled]=\"isDisabled()\"\n (input)=\"onDateChange($event)\"\n (blur)=\"onDateInputBlur()\"\n (keydown.enter)=\"onEnter($any($event))\"\n />\n <button class=\"c-entry-input__addon icon-calendar-thin\" \n tabindex=\"-1\"\n type=\"button\"\n (click)=\"onCalendarClick($event)\"></button>\n </span>\n <span class=\"c-entry-input c-entry-input--native-select\"\n [class.is-placeholder]=\"isHourPlaceholderVisible()\"\n [class.is-open]=\"isHourOpen()\"\n [class.has-value]=\"!isHourPlaceholderVisible()\"\n [class.is-disabled]=\"isTimeDisabled()\"\n >\n <div class=\"c-native-select__control\" (click)=\"toggleHourDropdown($event)\">\n @if (selectedHour() !== null && selectedHour() !== undefined) {\n <span class=\"c-native-select__single-value\">{{ selectedHour()!.toString().padStart(2, '0') }}</span>\n } @else {\n <span class=\"c-native-select__placeholder\">HH</span>\n }\n </div>\n <span\n class=\"c-entry-input__addon icon-select-arrow\"\n [class.is-flipped]=\"isHourOpen()\"\n (click)=\"toggleHourDropdown($event)\"\n ></span>\n @if (isHourOpen()) {\n <div class=\"c-native-select__dropdown\">\n <div class=\"c-native-select__options\">\n @for (option of hoursOptions(); track option.value; let i = $index) {\n <div\n class=\"c-native-select__option\"\n [class.is-selected]=\"selectedHour() === option.value\"\n [class.is-highlighted]=\"highlightedHourIndex() === i\"\n (click)=\"selectHourOption(option.value, $event)\"\n (mouseenter)=\"highlightedHourIndex.set(i)\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </span>\n <span class=\"c-entry-datetime__separator\">:</span>\n <span class=\"c-entry-input c-entry-input--native-select\"\n [class.is-placeholder]=\"isMinutePlaceholderVisible()\"\n [class.is-open]=\"isMinuteOpen()\"\n [class.has-value]=\"!isMinutePlaceholderVisible()\"\n [class.is-disabled]=\"isTimeDisabled()\"\n >\n <div class=\"c-native-select__control\" (click)=\"toggleMinuteDropdown($event)\">\n @if (selectedMinute() !== null && selectedMinute() !== undefined) {\n <span class=\"c-native-select__single-value\">{{ selectedMinute()!.toString().padStart(2, '0') }}</span>\n } @else {\n <span class=\"c-native-select__placeholder\">MM</span>\n }\n </div>\n <span\n class=\"c-entry-input__addon icon-select-arrow\"\n [class.is-flipped]=\"isMinuteOpen()\"\n (click)=\"toggleMinuteDropdown($event)\"\n ></span>\n @if (isMinuteOpen()) {\n <div class=\"c-native-select__dropdown\">\n <div class=\"c-native-select__options\">\n @for (option of minutesOptions(); track option.value; let i = $index) {\n <div\n class=\"c-native-select__option\"\n [class.is-selected]=\"selectedMinute() === option.value\"\n [class.is-highlighted]=\"highlightedMinuteIndex() === i\"\n (click)=\"selectMinuteOption(option.value, $event)\"\n (mouseenter)=\"highlightedMinuteIndex.set(i)\"\n >\n {{ option.label }}\n </div>\n }\n </div>\n </div>\n }\n </span>\n </div>\n <core-field-errors [errors]=\"errors()\" />\n</div>\n\n\n" }]
1389
+ }], ctorParameters: () => [], propDecorators: { onDocumentClick: [{
1390
+ type: HostListener,
1391
+ args: ['document:click', ['$event']]
1392
+ }] } });
1340
1393
 
1341
1394
  var DocumentPayloadMode;
1342
1395
  (function (DocumentPayloadMode) {
@@ -14921,7 +14974,7 @@ class GenericTableComponent {
14921
14974
  const payload = this.createSafePayload(updatedData);
14922
14975
  this.modelApiService.createItem(this.endpoint(), payload, this.modelFactory()).subscribe({
14923
14976
  next: (createdItem) => {
14924
- this.dataCreated.emit(updatedData);
14977
+ this.dataCreated.emit(createdItem);
14925
14978
  this.markItemAsNewlyModified(createdItem.getId());
14926
14979
  this.tableActionService.closeModal();
14927
14980
  },
@@ -17674,12 +17727,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
17674
17727
  // Este archivo es generado automáticamente por scripts/update-version.js
17675
17728
  // No edites manualmente este archivo
17676
17729
  const VERSION = {
17677
- full: '2.20.26',
17730
+ full: '2.20.28',
17678
17731
  major: 2,
17679
17732
  minor: 20,
17680
- patch: 26,
17681
- timestamp: '2026-02-25T13:49:44.166Z',
17682
- buildDate: '25/2/2026'
17733
+ patch: 28,
17734
+ timestamp: '2026-02-27T12:42:41.128Z',
17735
+ buildDate: '27/2/2026'
17683
17736
  };
17684
17737
 
17685
17738
  class MainNavComponent {