@ethlete/core 3.0.0 → 3.1.0

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 (39) hide show
  1. package/esm2022/lib/components/structured-data/structured-data.component.mjs +3 -3
  2. package/esm2022/lib/directives/animatable/animatable.directive.mjs +3 -3
  3. package/esm2022/lib/directives/animated-lifecycle/animated-lifecycle.directive.mjs +3 -3
  4. package/esm2022/lib/directives/animated-overlay/animated-overlay.directive.mjs +3 -3
  5. package/esm2022/lib/directives/click-outside/click-outside.directive.mjs +3 -3
  6. package/esm2022/lib/directives/cursor-drag-scroll/cursor-drag-scroll.directive.mjs +3 -3
  7. package/esm2022/lib/directives/delayable/delayable.directive.mjs +3 -3
  8. package/esm2022/lib/directives/is-active-element/is-active-element.directive.mjs +3 -3
  9. package/esm2022/lib/directives/is-element/is-element.directive.mjs +3 -3
  10. package/esm2022/lib/directives/let/let.directive.mjs +3 -3
  11. package/esm2022/lib/directives/observe-content/observe-content.directive.mjs +3 -3
  12. package/esm2022/lib/directives/observe-resize/observe-resize.directive.mjs +3 -3
  13. package/esm2022/lib/directives/observe-scroll-state/observe-scroll-state.directive.mjs +3 -3
  14. package/esm2022/lib/directives/repeat/repeat.directive.mjs +3 -3
  15. package/esm2022/lib/directives/scroll-observer-first-element/scroll-observer-first-element.directive.mjs +3 -3
  16. package/esm2022/lib/directives/scroll-observer-ignore-target/scroll-observer-ignore-target.directive.mjs +3 -3
  17. package/esm2022/lib/directives/scroll-observer-last-element/scroll-observer-last-element.directive.mjs +3 -3
  18. package/esm2022/lib/directives/seo/seo.directive.mjs +3 -3
  19. package/esm2022/lib/pipes/normalize-game-result-type/normalize-game-result-type.pipe.mjs +3 -3
  20. package/esm2022/lib/pipes/normalize-match-participants/normalize-match-participants.pipe.mjs +3 -3
  21. package/esm2022/lib/pipes/normalize-match-score/normalize-match-score.pipe.mjs +3 -3
  22. package/esm2022/lib/pipes/normalize-match-state/normalize-match-state.pipe.mjs +3 -3
  23. package/esm2022/lib/pipes/normalize-match-type/normalize-match-type.pipe.mjs +3 -3
  24. package/esm2022/lib/pipes/to-array/to-array.pipe.mjs +3 -3
  25. package/esm2022/lib/services/click-observer.service.mjs +6 -6
  26. package/esm2022/lib/services/content-observer.service.mjs +6 -6
  27. package/esm2022/lib/services/focus-visible.service.mjs +3 -3
  28. package/esm2022/lib/services/resize-observer.service.mjs +6 -6
  29. package/esm2022/lib/services/router-state.service.mjs +3 -3
  30. package/esm2022/lib/services/viewport.service.mjs +3 -3
  31. package/esm2022/lib/validators/at-least-one-required.validator.mjs +20 -0
  32. package/esm2022/lib/validators/must-match.validator.mjs +10 -10
  33. package/esm2022/lib/validators/public-api.mjs +4 -1
  34. package/fesm2022/ethlete-core.mjs +130 -109
  35. package/fesm2022/ethlete-core.mjs.map +1 -1
  36. package/lib/validators/at-least-one-required.validator.d.ts +14 -0
  37. package/lib/validators/must-match.validator.d.ts +4 -2
  38. package/lib/validators/public-api.d.ts +5 -1
  39. package/package.json +7 -7
@@ -0,0 +1,14 @@
1
+ import { ValidatorFn } from '@angular/forms';
2
+ export declare const AT_LEAST_ONE_REQUIRED = "atLeastOneRequired";
3
+ export interface ValidateAtLeastOneRequiredConfig {
4
+ /**
5
+ * Keys of form controls to validate in the supplied form group
6
+ */
7
+ keys: string[];
8
+ /**
9
+ * If true, the value `false` will result in a validation error
10
+ * @default false
11
+ */
12
+ checkFalse?: boolean;
13
+ }
14
+ export declare const ValidateAtLeastOneRequired: (config: ValidateAtLeastOneRequiredConfig) => ValidatorFn;
@@ -1,3 +1,5 @@
1
- import { FormGroup } from '@angular/forms';
1
+ import { AbstractControl } from '@angular/forms';
2
2
  export declare const MUST_MATCH = "mustMatch";
3
- export declare const MustMatch: (controlName: string, matchingControlName: string) => (formGroup: FormGroup) => void;
3
+ export declare const MustMatch: (controlName: string, matchingControlName: string) => (formGroup: AbstractControl) => {
4
+ mustMatch: boolean;
5
+ } | null;
@@ -1,8 +1,12 @@
1
+ export * from './at-least-one-required.validator';
1
2
  export * from './is-array-not-empty.validator';
2
3
  export * from './is-email.validator';
3
4
  export * from './must-match.validator';
4
5
  export declare const Validators: {
5
- readonly MustMatch: (controlName: string, matchingControlName: string) => (formGroup: import("@angular/forms").FormGroup<any>) => void;
6
+ readonly MustMatch: (controlName: string, matchingControlName: string) => (formGroup: import("@angular/forms").AbstractControl<any, any>) => {
7
+ mustMatch: boolean;
8
+ } | null;
6
9
  readonly IsEmail: (control: import("@angular/forms").AbstractControl<any, any>) => import("@angular/forms").ValidationErrors | null;
7
10
  readonly IsArrayNotEmpty: (control: import("@angular/forms").AbstractControl<any, any>) => import("@angular/forms").ValidationErrors | null;
11
+ readonly ValidateAtLeastOneRequired: (config: import("./at-least-one-required.validator").ValidateAtLeastOneRequiredConfig) => import("@angular/forms").ValidatorFn;
8
12
  };
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@ethlete/core",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.5.0"
6
6
  },
7
7
  "peerDependencies": {
8
8
  "@angular/common": "^15.2.1 || ^16.0.0",
9
9
  "@angular/core": "^15.2.1 || ^16.0.0",
10
- "@angular/platform-browser": "16.1.6",
11
- "@ethlete/types": "1.3.0",
10
+ "@angular/platform-browser": "16.2.0",
11
+ "@ethlete/types": "1.4.0",
12
12
  "rxjs": "7.8.1",
13
- "@angular/cdk": "16.1.5",
14
- "@floating-ui/dom": "1.4.5",
15
- "@angular/router": "16.1.6",
16
- "@angular/forms": "16.1.6"
13
+ "@angular/cdk": "16.2.0",
14
+ "@floating-ui/dom": "1.5.1",
15
+ "@angular/router": "16.2.0",
16
+ "@angular/forms": "16.2.0"
17
17
  },
18
18
  "module": "fesm2022/ethlete-core.mjs",
19
19
  "typings": "index.d.ts",