@lucca-front/ng 19.3.2-rc.1 → 19.3.3-rc.1

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.
Files changed (42) hide show
  1. package/core-select/api/api-v3.directive.d.ts +0 -1
  2. package/core-select/api/api.directive.d.ts +2 -2
  3. package/core-select/establishment/establishments.directive.d.ts +0 -1
  4. package/core-select/input/select-input.component.d.ts +2 -0
  5. package/core-select/job-qualification/job-qualifications.directive.d.ts +0 -1
  6. package/core-select/user/users.directive.d.ts +0 -1
  7. package/date2/abstract-date-component.d.ts +2 -0
  8. package/date2/date-input/date-input.component.d.ts +11 -3
  9. package/date2/date-range-input/date-range-input.component.d.ts +3 -1
  10. package/fesm2022/lucca-front-ng-core-select-api.mjs +11 -4
  11. package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
  12. package/fesm2022/lucca-front-ng-core-select-establishment.mjs +0 -1
  13. package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
  14. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +0 -1
  15. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
  16. package/fesm2022/lucca-front-ng-core-select-user.mjs +0 -1
  17. package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
  18. package/fesm2022/lucca-front-ng-core-select.mjs +5 -3
  19. package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
  20. package/fesm2022/lucca-front-ng-date2.mjs +56 -32
  21. package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
  22. package/fesm2022/lucca-front-ng-file-upload.mjs +11 -6
  23. package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
  24. package/fesm2022/lucca-front-ng-form-field.mjs +2 -1
  25. package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
  26. package/fesm2022/lucca-front-ng-forms.mjs +2 -2
  27. package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
  28. package/fesm2022/lucca-front-ng-highlight-data.mjs +3 -3
  29. package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
  30. package/fesm2022/lucca-front-ng-page-header.mjs +2 -2
  31. package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
  32. package/fesm2022/lucca-front-ng-skeleton.mjs +2 -2
  33. package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
  34. package/fesm2022/lucca-front-ng-title.mjs +21 -5
  35. package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
  36. package/file-upload/base-file-upload/base-file-upload.component.d.ts +4 -1
  37. package/form-field/form-field.component.d.ts +1 -0
  38. package/forms/radio-group-input/radio/radio.component.d.ts +2 -1
  39. package/highlight-data/highlight-data.component.d.ts +4 -3
  40. package/package.json +43 -43
  41. package/title/README.md +44 -12
  42. package/title/title.strategy.d.ts +5 -0
@@ -750,34 +750,37 @@ class AbstractDateComponent {
750
750
  });
751
751
  }
752
752
  isInMinMax(date, mode) {
753
- let result = true;
754
- if (this.min()) {
755
- switch (mode) {
756
- case 'day':
757
- result = result && this.min().getTime() <= date.getTime();
758
- break;
759
- case 'month':
760
- result = (result && isBefore(startOfMonth(this.min()), startOfMonth(date))) || isSameMonth(this.min(), date);
761
- break;
762
- case 'year':
763
- result = result && this.min().getFullYear() <= date.getFullYear();
764
- break;
765
- }
753
+ return this.isAfterMin(date, mode) && this.isBeforeMax(date, mode);
754
+ }
755
+ isAfterMin(date, mode) {
756
+ if (!this.min()) {
757
+ return true;
766
758
  }
767
- if (this.max()) {
768
- switch (mode) {
769
- case 'day':
770
- result = result && this.max().getTime() >= date.getTime();
771
- break;
772
- case 'month':
773
- result = (result && isAfter(startOfMonth(this.max()), startOfMonth(date))) || isSameMonth(this.max(), date);
774
- break;
775
- case 'year':
776
- result = result && this.max().getFullYear() >= date.getFullYear();
777
- break;
778
- }
759
+ switch (mode) {
760
+ case 'day':
761
+ return this.min().getTime() <= date.getTime();
762
+ case 'month':
763
+ return isBefore(startOfMonth(this.min()), startOfMonth(date)) || isSameMonth(this.min(), date);
764
+ case 'year':
765
+ return this.min().getFullYear() <= date.getFullYear();
766
+ default:
767
+ return true;
768
+ }
769
+ }
770
+ isBeforeMax(date, mode) {
771
+ if (!this.max()) {
772
+ return true;
773
+ }
774
+ switch (mode) {
775
+ case 'day':
776
+ return this.max().getTime() >= date.getTime();
777
+ case 'month':
778
+ return isAfter(startOfMonth(this.max()), startOfMonth(date)) || isSameMonth(this.max(), date);
779
+ case 'year':
780
+ return this.max().getFullYear() >= date.getFullYear();
781
+ default:
782
+ return true;
779
783
  }
780
- return result;
781
784
  }
782
785
  isValidDate(date) {
783
786
  return !!date && !isNaN(date.getTime());
@@ -826,6 +829,9 @@ class DateInputComponent extends AbstractDateComponent {
826
829
  // CVA stuff
827
830
  #onChange;
828
831
  #luClass;
832
+ get isWidthAuto() {
833
+ return this.widthAuto();
834
+ }
829
835
  #defaultClearable;
830
836
  #defaultFilterPillClearable;
831
837
  get isNavigationButtonFocused() {
@@ -838,6 +844,7 @@ class DateInputComponent extends AbstractDateComponent {
838
844
  this.placeholder = input();
839
845
  this.disableOverflow = input(false, { transform: booleanAttribute });
840
846
  this.hideOverflow = input(false, { transform: booleanAttribute });
847
+ this.widthAuto = input(false, { transform: booleanAttribute });
841
848
  this.filterPillDisabled = signal(false);
842
849
  this.popoverPositions = [
843
850
  new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, -8, 0),
@@ -1009,8 +1016,11 @@ class DateInputComponent extends AbstractDateComponent {
1009
1016
  return { date: true };
1010
1017
  }
1011
1018
  // Check min and max
1012
- if (!this.isInMinMax(date, this.mode())) {
1013
- return { minMax: true };
1019
+ if (this.min() && !this.isAfterMin(date, this.mode())) {
1020
+ return { min: true };
1021
+ }
1022
+ else if (this.max() && !this.isBeforeMax(date, this.mode())) {
1023
+ return { max: true };
1014
1024
  }
1015
1025
  // Everything is valid
1016
1026
  return null;
@@ -1024,7 +1034,7 @@ class DateInputComponent extends AbstractDateComponent {
1024
1034
  this.currentDate.set(start);
1025
1035
  }
1026
1036
  else {
1027
- this.clear();
1037
+ this.reset();
1028
1038
  }
1029
1039
  }
1030
1040
  registerOnChange(fn) {
@@ -1036,9 +1046,13 @@ class DateInputComponent extends AbstractDateComponent {
1036
1046
  this.filterPillDisabled.set(isDisabled);
1037
1047
  super.setDisabledState(isDisabled);
1038
1048
  }
1039
- clear() {
1049
+ reset() {
1040
1050
  this.inputRef().nativeElement.value = '';
1051
+ this.dateFromWriteValue.set(null);
1041
1052
  this.selectedDate.set(null);
1053
+ }
1054
+ clear() {
1055
+ this.reset();
1042
1056
  this.#onChange?.(null);
1043
1057
  this.onTouched?.();
1044
1058
  }
@@ -1057,7 +1071,7 @@ class DateInputComponent extends AbstractDateComponent {
1057
1071
  this.filterPillPopoverCloseFn?.();
1058
1072
  }
1059
1073
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DateInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1060
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DateInputComponent, isStandalone: true, selector: "lu-date-input", inputs: { autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disableOverflow: { classPropertyName: "disableOverflow", publicName: "disableOverflow", isSignal: true, isRequired: false, transformFunction: null }, hideOverflow: { classPropertyName: "hideOverflow", publicName: "hideOverflow", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.mod-filterPill": "this.isFilterPill" }, classAttribute: "dateField" }, providers: [
1074
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DateInputComponent, isStandalone: true, selector: "lu-date-input", inputs: { autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disableOverflow: { classPropertyName: "disableOverflow", publicName: "disableOverflow", isSignal: true, isRequired: false, transformFunction: null }, hideOverflow: { classPropertyName: "hideOverflow", publicName: "hideOverflow", isSignal: true, isRequired: false, transformFunction: null }, widthAuto: { classPropertyName: "widthAuto", publicName: "widthAuto", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.mod-filterPill": "this.isFilterPill", "class.mod-auto": "this.isWidthAuto" }, classAttribute: "dateField" }, providers: [
1061
1075
  {
1062
1076
  provide: NG_VALUE_ACCESSOR,
1063
1077
  useExisting: forwardRef(() => DateInputComponent),
@@ -1099,6 +1113,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1099
1113
  }], ctorParameters: () => [], propDecorators: { isFilterPill: [{
1100
1114
  type: HostBinding,
1101
1115
  args: ['class.mod-filterPill']
1116
+ }], isWidthAuto: [{
1117
+ type: HostBinding,
1118
+ args: ['class.mod-auto']
1102
1119
  }] } });
1103
1120
 
1104
1121
  const PremadeShortcuts = {
@@ -1171,6 +1188,9 @@ class DateRangeInputComponent extends AbstractDateComponent {
1171
1188
  #breakpointObserver;
1172
1189
  // CVA stuff
1173
1190
  #onChange;
1191
+ get isWidthAuto() {
1192
+ return this.widthAuto();
1193
+ }
1174
1194
  #defaultClearable;
1175
1195
  #defaultFilterPillClearable;
1176
1196
  get isNavigationButtonFocused() {
@@ -1188,6 +1208,7 @@ class DateRangeInputComponent extends AbstractDateComponent {
1188
1208
  this.selectedRange = signal(null);
1189
1209
  this.dateHovered = signal(null);
1190
1210
  this.placeholder = input();
1211
+ this.widthAuto = input(false, { transform: booleanAttribute });
1191
1212
  this.popoverPositions = [
1192
1213
  new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, -8, 0),
1193
1214
  new ConnectionPositionPair({ originX: 'start', originY: 'top' }, {
@@ -1553,7 +1574,7 @@ class DateRangeInputComponent extends AbstractDateComponent {
1553
1574
  return 'calendarPlanning';
1554
1575
  }
1555
1576
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DateRangeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1556
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DateRangeInputComponent, isStandalone: true, selector: "lu-date-range-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, shortcuts: { classPropertyName: "shortcuts", publicName: "shortcuts", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.mod-filterPill": "this.isFilterPill" }, classAttribute: "dateRangeField" }, providers: [
1577
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: DateRangeInputComponent, isStandalone: true, selector: "lu-date-range-input", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, widthAuto: { classPropertyName: "widthAuto", publicName: "widthAuto", isSignal: true, isRequired: false, transformFunction: null }, shortcuts: { classPropertyName: "shortcuts", publicName: "shortcuts", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.mod-filterPill": "this.isFilterPill", "class.mod-auto": "this.isWidthAuto" }, classAttribute: "dateRangeField" }, providers: [
1557
1578
  {
1558
1579
  provide: NG_VALUE_ACCESSOR,
1559
1580
  useExisting: forwardRef(() => DateRangeInputComponent),
@@ -1597,6 +1618,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
1597
1618
  }], isFilterPill: [{
1598
1619
  type: HostBinding,
1599
1620
  args: ['class.mod-filterPill']
1621
+ }], isWidthAuto: [{
1622
+ type: HostBinding,
1623
+ args: ['class.mod-auto']
1600
1624
  }] } });
1601
1625
 
1602
1626
  /**