@gravitee/ui-particles-angular 7.32.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.
- package/esm2020/lib/gio-form-cron/gio-form-cron.adapter.mjs +44 -38
- package/esm2020/lib/gio-form-cron/gio-form-cron.component.mjs +121 -53
- package/esm2020/lib/gio-form-cron/gio-form-cron.harness.mjs +36 -6
- package/esm2020/lib/gio-form-cron/gio-form-cron.module.mjs +35 -4
- package/fesm2015/gravitee-ui-particles-angular.mjs +285 -143
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +268 -141
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-cron/gio-form-cron.adapter.d.ts +1 -1
- package/lib/gio-form-cron/gio-form-cron.component.d.ts +15 -8
- package/lib/gio-form-cron/gio-form-cron.harness.d.ts +8 -1
- package/lib/gio-form-cron/gio-form-cron.module.d.ts +4 -1
- package/package.json +1 -1
- package/src/lib/gio-button-toggle-group/gio-button-toggle-group.scss +6 -1
|
@@ -10,7 +10,7 @@ export interface CronDisplay {
|
|
|
10
10
|
hours?: number;
|
|
11
11
|
minutes?: number;
|
|
12
12
|
}
|
|
13
|
-
export declare const CRON_DISPLAY_MODES: readonly ["
|
|
13
|
+
export declare const CRON_DISPLAY_MODES: readonly ["secondly", "minutely", "hourly", "daily", "weekly", "monthly", "custom"];
|
|
14
14
|
export declare type CronDisplayMode = (typeof CRON_DISPLAY_MODES)[number];
|
|
15
15
|
export declare const getDefaultCronDisplay: (mode: CronDisplayMode) => CronDisplay;
|
|
16
16
|
export declare const parseCronExpression: (cronExpression: string) => CronDisplay;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
|
-
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, FormGroup,
|
|
2
|
+
import { ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
+
import { AbstractControl, ControlValueAccessor, FormGroup, ValidationErrors, Validator } from '@angular/forms';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class GioFormCronComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
6
|
-
readonly ngControl: NgControl;
|
|
5
|
+
export declare class GioFormCronComponent implements ControlValueAccessor, OnInit, OnDestroy, Validator {
|
|
7
6
|
private readonly elRef;
|
|
8
7
|
private readonly fm;
|
|
8
|
+
private readonly ngZone;
|
|
9
9
|
_onChange: (value: string | null) => void;
|
|
10
10
|
_onTouched: () => void;
|
|
11
11
|
seconds: number[];
|
|
@@ -15,18 +15,25 @@ export declare class GioFormCronComponent implements ControlValueAccessor, OnIni
|
|
|
15
15
|
daysOfWeek: string[];
|
|
16
16
|
internalFormGroup?: FormGroup;
|
|
17
17
|
value?: string;
|
|
18
|
+
expressionDescription?: string;
|
|
19
|
+
isDisabled: boolean;
|
|
20
|
+
smallDisplay: boolean;
|
|
18
21
|
private touched;
|
|
19
22
|
private focused;
|
|
20
|
-
private
|
|
21
|
-
private cronDisplay
|
|
23
|
+
private hasError;
|
|
24
|
+
private cronDisplay?;
|
|
22
25
|
private unsubscribe$;
|
|
23
|
-
|
|
26
|
+
private resizeObserver?;
|
|
27
|
+
constructor(elRef: ElementRef, fm: FocusMonitor, ngZone: NgZone);
|
|
24
28
|
ngOnInit(): void;
|
|
25
29
|
ngOnDestroy(): void;
|
|
26
30
|
writeValue(value: string): void;
|
|
27
31
|
registerOnChange(fn: (value: string | null) => void): void;
|
|
28
32
|
registerOnTouched(fn: () => void): void;
|
|
33
|
+
setDisabledState(isDisabled: boolean): void;
|
|
34
|
+
validate(_: AbstractControl): ValidationErrors | null;
|
|
35
|
+
onClear(): void;
|
|
29
36
|
private refreshInternalForm;
|
|
30
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronComponent,
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronComponent, never>;
|
|
31
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormCronComponent, "gio-form-cron", never, {}, {}, never, never>;
|
|
32
39
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { MatButtonToggleGroupHarness } from '@angular/material/button-toggle/testing';
|
|
2
3
|
export declare type GioFormCronHarnessFilters = BaseHarnessFilters;
|
|
3
4
|
export declare class GioFormCronHarness extends ComponentHarness {
|
|
4
5
|
static hostSelector: string;
|
|
6
|
+
protected getModeToggleGroup: import("@angular/cdk/testing").AsyncFactoryFn<MatButtonToggleGroupHarness>;
|
|
5
7
|
/**
|
|
6
8
|
* Gets a `HarnessPredicate` that can be used to search for this harness.
|
|
7
9
|
*
|
|
@@ -9,6 +11,11 @@ export declare class GioFormCronHarness extends ComponentHarness {
|
|
|
9
11
|
* @return a `HarnessPredicate` configured with the given options.
|
|
10
12
|
*/
|
|
11
13
|
static with(options?: GioFormCronHarnessFilters): HarnessPredicate<GioFormCronHarness>;
|
|
12
|
-
getMode(): Promise<string>;
|
|
14
|
+
getMode(): Promise<string | null>;
|
|
15
|
+
setMode(mode: string): Promise<void>;
|
|
16
|
+
clear(): Promise<void>;
|
|
13
17
|
getValue(): Promise<string | null>;
|
|
18
|
+
setCustomValue(value: string): Promise<void>;
|
|
19
|
+
isDisabled(): Promise<boolean>;
|
|
20
|
+
hasError(): Promise<boolean>;
|
|
14
21
|
}
|
|
@@ -6,8 +6,11 @@ import * as i4 from "@angular/material/button-toggle";
|
|
|
6
6
|
import * as i5 from "@angular/material/form-field";
|
|
7
7
|
import * as i6 from "@angular/material/select";
|
|
8
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";
|
|
9
12
|
export declare class GioFormCronModule {
|
|
10
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronModule, never>;
|
|
11
|
-
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 i1.GioFormCronComponent]>;
|
|
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]>;
|
|
12
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<GioFormCronModule>;
|
|
13
16
|
}
|
package/package.json
CHANGED
|
@@ -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;
|