@dsivd/prestations-ng 19.2.0-beta.18 → 19.2.0-beta.19

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.
package/package.json CHANGED
@@ -39,7 +39,7 @@
39
39
  "ng-update": {
40
40
  "migrations": "./schematics/migration-collection.json"
41
41
  },
42
- "version": "19.2.0-beta.18",
42
+ "version": "19.2.0-beta.19",
43
43
  "module": "fesm2022/dsivd-prestations-ng.mjs",
44
44
  "typings": "types/dsivd-prestations-ng.d.ts",
45
45
  "exports": {
@@ -255,6 +255,14 @@ declare abstract class FoehnInputComponent<T> implements OnInit, AfterViewInit {
255
255
  getAutoComplete(): string | undefined;
256
256
  protected getFirstInputComponentEnabled(subComponents: readonly FoehnInputComponent<any>[]): FoehnInputComponent<any> | null;
257
257
  protected findFirstHtmlInputElementEnabled(elementNodeListOf: NodeListOf<Element>): HTMLInputElement | null;
258
+ /**
259
+ * Whether a model given by the page has a value to display, which makes it known (`model_`) before
260
+ * `onModelChange()`: by default, any value (see `ObjectHelper.hasAnyValue()`). To override when the component
261
+ * doesn't display a part of its model (e.g. the country of an address only Swiss, or an id).
262
+ * @param value of the model
263
+ * @returns whether the model has a value to display
264
+ */
265
+ protected hasValueToDisplay(value: T | null | undefined): boolean;
258
266
  protected isEmpty(data: unknown): boolean;
259
267
  protected isEmptyWhenTrimmedIfString(data: unknown): boolean;
260
268
  protected triggerUserInput(value: T | null | undefined): void;
@@ -1518,6 +1526,7 @@ declare class FoehnInputAddressComponent extends FoehnInputComponent<Address> im
1518
1526
  isStreetRequired(): boolean;
1519
1527
  isForeignStreetRequired(): boolean;
1520
1528
  isPostOfficeBoxTextRequired(): boolean;
1529
+ protected hasValueToDisplay(value: Address | null | undefined): boolean;
1521
1530
  private sanitizeAddress;
1522
1531
  /**
1523
1532
  * @returns the sanitized address when it differs from the given value, otherwise null
@@ -3631,8 +3640,18 @@ declare class ObjectHelper {
3631
3640
  */
3632
3641
  static isEqual(value1: unknown, value2: unknown, skipFunctionTypeCompare?: boolean): boolean;
3633
3642
  static isDifferent(value1: unknown, value2: unknown, skipFunctionType?: boolean): boolean;
3634
- static hasAnyValue(value: any): boolean;
3635
- static isEmpty(value: any): boolean;
3643
+ /**
3644
+ * @param value to check
3645
+ * @returns whether the value isn't `null`, `undefined` or `''`, and, for an array or an object, whether one of its
3646
+ * items or properties holds a value (deeply). A number (`0` included), a boolean (`false` included) and a date are
3647
+ * values.
3648
+ */
3649
+ static hasAnyValue(value: unknown): boolean;
3650
+ /**
3651
+ * @param value to check
3652
+ * @returns the contrary of {@link hasAnyValue}
3653
+ */
3654
+ static isEmpty(value: unknown): boolean;
3636
3655
  /**
3637
3656
  * Deep copy is a true copy for nested objects
3638
3657
  * Often, shallow copy is good enough and you will not need a deep copy.
@@ -3646,7 +3665,7 @@ declare class ObjectHelper {
3646
3665
  */
3647
3666
  static deepCopy(obj: any): any;
3648
3667
  static stripHtml(html: string): string;
3649
- static getNestedProperty(obj: any, key: string): any;
3668
+ static getNestedProperty(obj: unknown, key: string): any;
3650
3669
  }
3651
3670
 
3652
3671
  declare class ScrollHelper {