@gravitee/ui-particles-angular 7.29.3 → 7.31.0-form-cron-a842318
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/assets/gio-icons.svg +36 -0
- package/esm2020/lib/gio-form-cron/gio-form-cron.adapter.mjs +212 -0
- package/esm2020/lib/gio-form-cron/gio-form-cron.component.mjs +134 -0
- package/esm2020/lib/gio-form-cron/gio-form-cron.harness.mjs +42 -0
- package/esm2020/lib/gio-form-cron/gio-form-cron.module.mjs +38 -0
- package/esm2020/lib/public-api.mjs +4 -1
- package/fesm2015/gravitee-ui-particles-angular.mjs +452 -61
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +464 -61
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-cron/gio-form-cron.adapter.d.ts +18 -0
- package/lib/gio-form-cron/gio-form-cron.component.d.ts +32 -0
- package/lib/gio-form-cron/gio-form-cron.harness.d.ts +14 -0
- package/lib/gio-form-cron/gio-form-cron.module.d.ts +13 -0
- package/lib/public-api.d.ts +3 -0
- package/package.json +2 -1
- package/src/{scss/component → lib}/gio-badge/gio-badge.scss +2 -2
- package/src/lib/gio-button-toggle-group/gio-button-toggle-group.scss +54 -0
- package/src/{scss/component → lib}/gio-caption-2/gio-caption-2.scss +1 -1
- package/src/{scss/component → lib}/gio-code/gio-code.scss +1 -1
- package/src/{scss/component → lib}/gio-link/gio-link.scss +1 -1
- package/src/{scss/component → lib}/gio-method-badge/gio-method-badge.scss +2 -2
- package/src/{scss/gio-components.scss → lib/gio-scss-components.scss} +9 -7
- package/src/{scss/component → lib}/gio-table-light/gio-table-light.scss +2 -2
- package/src/lib/public-api.scss +19 -0
- package/src/scss/index.scss +3 -1
|
@@ -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 ["second", "minute", "hour", "day", "week", "month", "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,32 @@
|
|
|
1
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, FormGroup, NgControl } from '@angular/forms';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class GioFormCronComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
6
|
+
readonly ngControl: NgControl;
|
|
7
|
+
private readonly elRef;
|
|
8
|
+
private readonly fm;
|
|
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
|
+
private touched;
|
|
19
|
+
private focused;
|
|
20
|
+
private defaultMode;
|
|
21
|
+
private cronDisplay;
|
|
22
|
+
private unsubscribe$;
|
|
23
|
+
constructor(ngControl: NgControl, elRef: ElementRef, fm: FocusMonitor);
|
|
24
|
+
ngOnInit(): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
writeValue(value: string): void;
|
|
27
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
28
|
+
registerOnTouched(fn: () => void): void;
|
|
29
|
+
private refreshInternalForm;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GioFormCronComponent, [{ optional: true; self: true; }, null, null]>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GioFormCronComponent, "gio-form-cron", never, {}, {}, never, never>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
export declare type GioFormCronHarnessFilters = BaseHarnessFilters;
|
|
3
|
+
export declare class GioFormCronHarness extends ComponentHarness {
|
|
4
|
+
static hostSelector: string;
|
|
5
|
+
/**
|
|
6
|
+
* Gets a `HarnessPredicate` that can be used to search for this harness.
|
|
7
|
+
*
|
|
8
|
+
* @param options Options for filtering which input instances are considered a match.
|
|
9
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
10
|
+
*/
|
|
11
|
+
static with(options?: GioFormCronHarnessFilters): HarnessPredicate<GioFormCronHarness>;
|
|
12
|
+
getMode(): Promise<string>;
|
|
13
|
+
getValue(): Promise<string | null>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export declare class GioFormCronModule {
|
|
10
|
+
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]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<GioFormCronModule>;
|
|
13
|
+
}
|
package/lib/public-api.d.ts
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "7.31.0-form-cron-a842318",
|
|
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": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
@use 'sass:map';
|
|
17
17
|
@use '@angular/material' as mat;
|
|
18
18
|
|
|
19
|
-
@use '../../gio-mat-palettes.scss' as palettes;
|
|
20
|
-
@use '../../gio-mat-theme-variable' as theme;
|
|
19
|
+
@use '../../scss/gio-mat-palettes.scss' as palettes;
|
|
20
|
+
@use '../../scss/gio-mat-theme-variable' as theme;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Gravitee.io version of bootstrap "badge" element
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2021 The Gravitee team (http://gravitee.io)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
@use 'sass:map';
|
|
17
|
+
@use '@angular/material' as mat;
|
|
18
|
+
@use '../../scss/gio-mat-palettes' as palettes;
|
|
19
|
+
@use '../../scss/gio-mat-theme-variable' as theme;
|
|
20
|
+
|
|
21
|
+
$typography: map.get(theme.$mat-theme, typography);
|
|
22
|
+
|
|
23
|
+
@mixin gio-button-toggle-group {
|
|
24
|
+
width: fit-content;
|
|
25
|
+
height: 44px;
|
|
26
|
+
padding: 4px;
|
|
27
|
+
border: solid 1px mat.get-color-from-palette(palettes.$mat-dove-palette, 'darker20');
|
|
28
|
+
margin-bottom: 16px;
|
|
29
|
+
|
|
30
|
+
.mat-button-toggle {
|
|
31
|
+
@include mat.typography-level($typography, body-2);
|
|
32
|
+
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
align-items: center;
|
|
36
|
+
border-radius: 4px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mat-button-toggle.mat-button-toggle-checked {
|
|
40
|
+
background-color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'darker20');
|
|
41
|
+
color: mat.get-color-from-palette(palettes.$mat-accent-palette, default-contrast);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.mat-button-toggle.mat-button-toggle + .mat-button-toggle {
|
|
45
|
+
border: none;
|
|
46
|
+
margin-left: 8px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin theme() {
|
|
51
|
+
.gio-button-toggle-group {
|
|
52
|
+
@include gio-button-toggle-group;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
@use '../../theme/typography/gio-typography' as typo;
|
|
16
|
+
@use '../../scss/theme/typography/gio-typography' as typo;
|
|
17
17
|
|
|
18
18
|
@mixin theme() {
|
|
19
19
|
.gio-caption-2,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
@use '../../theme/typography/gio-typography' as typo;
|
|
16
|
+
@use '../../scss/theme/typography/gio-typography' as typo;
|
|
17
17
|
|
|
18
18
|
@mixin theme() {
|
|
19
19
|
code,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
@use '../../theme/typography/gio-typography' as typo;
|
|
16
|
+
@use '../../scss/theme/typography/gio-typography' as typo;
|
|
17
17
|
|
|
18
18
|
@mixin theme() {
|
|
19
19
|
a {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
@use 'sass:map';
|
|
17
17
|
@use '@angular/material' as mat;
|
|
18
18
|
|
|
19
|
-
@use '../../gio-mat-palettes.scss' as palettes;
|
|
20
|
-
@use '../../gio-mat-theme-variable' as theme;
|
|
19
|
+
@use '../../scss/gio-mat-palettes.scss' as palettes;
|
|
20
|
+
@use '../../scss/gio-mat-theme-variable' as theme;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Gravitee.io version of bootstrap "badge" element dedicated to HTTP verbs
|
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
@use './
|
|
17
|
-
@use './
|
|
18
|
-
@use './
|
|
19
|
-
@use './
|
|
20
|
-
@use './
|
|
21
|
-
@use './
|
|
16
|
+
@use './gio-badge/gio-badge';
|
|
17
|
+
@use './gio-method-badge/gio-method-badge';
|
|
18
|
+
@use './gio-code/gio-code';
|
|
19
|
+
@use './gio-table-light/gio-table-light';
|
|
20
|
+
@use './gio-link/gio-link';
|
|
21
|
+
@use './gio-caption-2/gio-caption-2';
|
|
22
|
+
@use './gio-button-toggle-group/gio-button-toggle-group';
|
|
22
23
|
|
|
23
|
-
// All Gravitee.io SCSS components
|
|
24
|
+
// All Gravitee.io SCSS components to add globally in main.scss
|
|
24
25
|
@mixin all-components() {
|
|
25
26
|
@include gio-badge.theme;
|
|
26
27
|
@include gio-method-badge.theme;
|
|
@@ -28,4 +29,5 @@
|
|
|
28
29
|
@include gio-table-light.theme;
|
|
29
30
|
@include gio-link.theme;
|
|
30
31
|
@include gio-caption-2.theme;
|
|
32
|
+
@include gio-button-toggle-group.theme;
|
|
31
33
|
}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
@use 'sass:map';
|
|
17
17
|
@use '@angular/material' as mat;
|
|
18
18
|
|
|
19
|
-
@use '../../gio-mat-palettes.scss' as palettes;
|
|
20
|
-
@use '../../gio-mat-theme-variable' as theme;
|
|
19
|
+
@use '../../scss/gio-mat-palettes.scss' as palettes;
|
|
20
|
+
@use '../../scss/gio-mat-theme-variable' as theme;
|
|
21
21
|
|
|
22
22
|
$background: map.get(theme.$mat-theme, background);
|
|
23
23
|
$typography: map.get(theme.$mat-theme, typography);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2021 The Gravitee team (http://gravitee.io)
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// Forwards mixins to use in scss files
|
|
18
|
+
|
|
19
|
+
@forward './gio-button-toggle-group/gio-button-toggle-group' show gio-button-toggle-group;
|