@gravitee/ui-particles-angular 7.31.0 → 7.33.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.
@@ -0,0 +1,18 @@
1
+ export interface CronDisplay {
2
+ mode: CronDisplayMode;
3
+ secondInterval?: number;
4
+ minuteInterval?: number;
5
+ hourInterval?: number;
6
+ dayInterval?: number;
7
+ dayOfWeek?: number;
8
+ dayOfMonth?: number;
9
+ customExpression?: string;
10
+ hours?: number;
11
+ minutes?: number;
12
+ }
13
+ export declare const CRON_DISPLAY_MODES: readonly ["secondly", "minutely", "hourly", "daily", "weekly", "monthly", "custom"];
14
+ export declare type CronDisplayMode = (typeof CRON_DISPLAY_MODES)[number];
15
+ export declare const getDefaultCronDisplay: (mode: CronDisplayMode) => CronDisplay;
16
+ export declare const parseCronExpression: (cronExpression: string) => CronDisplay;
17
+ export declare const toCronExpression: (cronDisplay: Omit<CronDisplay, 'cronDescription'>) => string;
18
+ export declare const toCronDescription: (cronExpression: string) => string;
@@ -0,0 +1,39 @@
1
+ import { FocusMonitor } from '@angular/cdk/a11y';
2
+ import { ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
3
+ import { AbstractControl, ControlValueAccessor, FormGroup, ValidationErrors, Validator } from '@angular/forms';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GioFormCronComponent implements ControlValueAccessor, OnInit, OnDestroy, Validator {
6
+ private readonly elRef;
7
+ private readonly fm;
8
+ private readonly ngZone;
9
+ _onChange: (value: string | null) => void;
10
+ _onTouched: () => void;
11
+ seconds: number[];
12
+ minutes: number[];
13
+ hours: number[];
14
+ daysOfMonth: number[];
15
+ daysOfWeek: string[];
16
+ internalFormGroup?: FormGroup;
17
+ value?: string;
18
+ expressionDescription?: string;
19
+ isDisabled: boolean;
20
+ smallDisplay: boolean;
21
+ private touched;
22
+ private focused;
23
+ private hasError;
24
+ private cronDisplay?;
25
+ private unsubscribe$;
26
+ private resizeObserver?;
27
+ constructor(elRef: ElementRef, fm: FocusMonitor, ngZone: NgZone);
28
+ ngOnInit(): void;
29
+ ngOnDestroy(): void;
30
+ writeValue(value: string): void;
31
+ registerOnChange(fn: (value: string | null) => void): void;
32
+ registerOnTouched(fn: () => void): void;
33
+ setDisabledState(isDisabled: boolean): void;
34
+ validate(_: AbstractControl): ValidationErrors | null;
35
+ onClear(): void;
36
+ private refreshInternalForm;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<GioFormCronComponent, "gio-form-cron", never, {}, {}, never, never>;
39
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { MatButtonToggleGroupHarness } from '@angular/material/button-toggle/testing';
3
+ export declare type GioFormCronHarnessFilters = BaseHarnessFilters;
4
+ export declare class GioFormCronHarness extends ComponentHarness {
5
+ static hostSelector: string;
6
+ protected getModeToggleGroup: import("@angular/cdk/testing").AsyncFactoryFn<MatButtonToggleGroupHarness>;
7
+ /**
8
+ * Gets a `HarnessPredicate` that can be used to search for this harness.
9
+ *
10
+ * @param options Options for filtering which input instances are considered a match.
11
+ * @return a `HarnessPredicate` configured with the given options.
12
+ */
13
+ static with(options?: GioFormCronHarnessFilters): HarnessPredicate<GioFormCronHarness>;
14
+ getMode(): Promise<string | null>;
15
+ setMode(mode: string): Promise<void>;
16
+ clear(): Promise<void>;
17
+ getValue(): Promise<string | null>;
18
+ setCustomValue(value: string): Promise<void>;
19
+ isDisabled(): Promise<boolean>;
20
+ hasError(): Promise<boolean>;
21
+ }
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./gio-form-cron.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/button-toggle";
6
+ import * as i5 from "@angular/material/form-field";
7
+ import * as i6 from "@angular/material/select";
8
+ import * as i7 from "@angular/material/input";
9
+ import * as i8 from "@angular/material/button";
10
+ import * as i9 from "@angular/material/tooltip";
11
+ import * as i10 from "../gio-icons/gio-icons.module";
12
+ export declare class GioFormCronModule {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GioFormCronModule, [typeof i1.GioFormCronComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.MatButtonToggleModule, typeof i5.MatFormFieldModule, typeof i6.MatSelectModule, typeof i7.MatInputModule, typeof i8.MatButtonModule, typeof i9.MatTooltipModule, typeof i10.GioIconsModule], [typeof i1.GioFormCronComponent]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<GioFormCronModule>;
16
+ }
@@ -54,3 +54,6 @@ export * from './gio-license/gio-license.directive';
54
54
  export * from './gio-license/gio-license-dialog/gio-license-dialog.module';
55
55
  export * from './gio-license/gio-license-dialog/gio-license-dialog.component';
56
56
  export * from './gio-license/gio-license.testing.module';
57
+ export * from './gio-form-cron/gio-form-cron.component';
58
+ export * from './gio-form-cron/gio-form-cron.module';
59
+ export * from './gio-form-cron/gio-form-cron.harness';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/ui-particles-angular",
3
- "version": "7.31.0",
3
+ "version": "7.33.0",
4
4
  "description": "Gravitee.io - UI Particles Angular",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,7 @@
11
11
  "@fontsource/fira-mono": "4.5.0",
12
12
  "@fontsource/golos-ui": "^4.5.1",
13
13
  "@fontsource/material-icons": "4.5.1",
14
+ "cronstrue": "^2.32.0",
14
15
  "tslib": "2.3.1"
15
16
  },
16
17
  "peerDependencies": {
@@ -36,11 +36,16 @@ $typography: map.get(theme.$mat-theme, typography);
36
36
  border-radius: 4px;
37
37
  }
38
38
 
39
- .mat-button-toggle.mat-button-toggle-checked {
39
+ .mat-button-toggle.mat-button-toggle-checked:not(.mat-button-toggle-disabled) {
40
40
  background-color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'darker20');
41
41
  color: mat.get-color-from-palette(palettes.$mat-accent-palette, default-contrast);
42
42
  }
43
43
 
44
+ .mat-button-toggle.mat-button-toggle-checked.mat-button-toggle-disabled {
45
+ background-color: mat.get-color-from-palette(palettes.$mat-dove-palette, 'darker20');
46
+ color: mat.get-color-from-palette(palettes.$mat-dove-palette, darker20-contrast, 0.4);
47
+ }
48
+
44
49
  .mat-button-toggle.mat-button-toggle + .mat-button-toggle {
45
50
  border: none;
46
51
  margin-left: 8px;