@ifsworld/granite-components 12.2.0 → 12.3.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/esm2022/index.mjs +2 -1
- package/esm2022/lib/progress-bar/progress-bar-legend/progress-bar-legend.component.mjs +19 -0
- package/esm2022/lib/progress-bar/progress-bar-legend-base.mjs +20 -0
- package/esm2022/lib/progress-bar/progress-bar-legend-trigger-for.directive.mjs +191 -0
- package/esm2022/lib/progress-bar/progress-bar.component.mjs +18 -3
- package/esm2022/lib/progress-bar/progress-bar.model.mjs +2 -0
- package/esm2022/lib/progress-bar/progress-bar.module.mjs +29 -5
- package/fesm2022/ifsworld-granite-components.mjs +265 -21
- package/fesm2022/ifsworld-granite-components.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/progress-bar/progress-bar-legend/progress-bar-legend.component.d.ts +8 -0
- package/lib/progress-bar/progress-bar-legend-base.d.ts +17 -0
- package/lib/progress-bar/progress-bar-legend-trigger-for.directive.d.ts +41 -0
- package/lib/progress-bar/progress-bar.component.d.ts +5 -8
- package/lib/progress-bar/progress-bar.model.d.ts +11 -0
- package/lib/progress-bar/progress-bar.module.d.ts +8 -4
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export * from './lib/contacts/custom-profile.directive';
|
|
|
50
50
|
export * from './lib/contacts/contacts-types/contacts.component.public-types';
|
|
51
51
|
export * from './lib/progress-bar/progress-bar.module';
|
|
52
52
|
export * from './lib/progress-bar/progress-bar.component';
|
|
53
|
+
export * from './lib/progress-bar/progress-bar.model';
|
|
53
54
|
export * from './lib/core/client-environment';
|
|
54
55
|
export * from './lib/core/core.module';
|
|
55
56
|
export * from './lib/core/devices/client-output-touch.directive';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LegendBaseComponent } from '../progress-bar-legend-base';
|
|
2
|
+
import { GraniteProgressLegendInterface } from '../progress-bar.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class GraniteProgressBarLegendComponent extends LegendBaseComponent {
|
|
5
|
+
legendItems: GraniteProgressLegendInterface[];
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteProgressBarLegendComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteProgressBarLegendComponent, "granite-progress-bar-legend", never, { "legendItems": { "alias": "legendItems"; "required": false; }; }, {}, never, never, false, never>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Direction } from '@angular/cdk/bidi';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { ClientInputInterface, ClientOutputInterface } from '../core/client-environment';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type PositionX = 'before' | 'after';
|
|
6
|
+
export type PositionY = 'above' | 'below';
|
|
7
|
+
export declare class LegendBaseComponent {
|
|
8
|
+
templateRef: TemplateRef<any>;
|
|
9
|
+
xPosition: PositionX;
|
|
10
|
+
yPosition: PositionY;
|
|
11
|
+
direction: Direction;
|
|
12
|
+
readonly panelId: string;
|
|
13
|
+
clientInput: ClientInputInterface;
|
|
14
|
+
clientOutput: ClientOutputInterface;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LegendBaseComponent, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LegendBaseComponent, never, never, {}, {}, never, never, false, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Overlay, OverlayOutsideClickDispatcher } from '@angular/cdk/overlay';
|
|
3
|
+
import { ClientInputInterface, ClientOutputInterface } from '../core/client-environment';
|
|
4
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
5
|
+
import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
|
|
6
|
+
import { GraniteProgressBarLegendComponent } from './progress-bar-legend/progress-bar-legend.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class GraniteProgressBarLegendTriggerForDirective implements OnDestroy {
|
|
9
|
+
private _overlay;
|
|
10
|
+
private _element;
|
|
11
|
+
private _viewContainerRef;
|
|
12
|
+
private _outsideClickDispatcher;
|
|
13
|
+
/** Client input device information */
|
|
14
|
+
_clientInput: ClientInputInterface;
|
|
15
|
+
/** Client output device information */
|
|
16
|
+
_clientOutput: ClientOutputInterface;
|
|
17
|
+
private _dir;
|
|
18
|
+
private _focusMonitor;
|
|
19
|
+
legend: GraniteProgressBarLegendComponent;
|
|
20
|
+
_isLegendOpen: boolean;
|
|
21
|
+
private _portal;
|
|
22
|
+
private _overlayRef;
|
|
23
|
+
constructor(_overlay: Overlay, _element: ElementRef<HTMLElement>, _viewContainerRef: ViewContainerRef, _outsideClickDispatcher: OverlayOutsideClickDispatcher,
|
|
24
|
+
/** Client input device information */
|
|
25
|
+
_clientInput: ClientInputInterface,
|
|
26
|
+
/** Client output device information */
|
|
27
|
+
_clientOutput: ClientOutputInterface, _dir: Directionality, _focusMonitor: FocusMonitor);
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
openLegend(): void;
|
|
30
|
+
toggleLegend(): void;
|
|
31
|
+
closeLegend(): void;
|
|
32
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
33
|
+
_handleClick(): void;
|
|
34
|
+
_restoreFocus(origin?: FocusOrigin, options?: FocusOptions): void;
|
|
35
|
+
private _desktopPositionStrategy;
|
|
36
|
+
private _setPosition;
|
|
37
|
+
private _positionStrategy;
|
|
38
|
+
private _touchPositionStrategy;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteProgressBarLegendTriggerForDirective, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, null]>;
|
|
40
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GraniteProgressBarLegendTriggerForDirective, "[graniteProgressBarLegendTriggerFor]", never, { "legend": { "alias": "graniteProgressBarLegendTriggerFor"; "required": false; }; }, {}, never, never, false, never>;
|
|
41
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { GraniteProgressInterface, GraniteProgressLegendInterface } from './progress-bar.model';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class GraniteProgressBarComponent implements OnChanges {
|
|
4
5
|
progressBarData: GraniteProgressInterface[];
|
|
5
6
|
showLabel: boolean;
|
|
7
|
+
showLegend: boolean;
|
|
6
8
|
DEFAULT_TOTAL: number;
|
|
7
9
|
DEFAULT_BACKGROUND: string;
|
|
8
10
|
DEFAULT_STACK_COLOR: string;
|
|
9
11
|
DEFAULT_COLOR: string;
|
|
10
12
|
total: number;
|
|
13
|
+
legendItems: GraniteProgressLegendInterface[];
|
|
11
14
|
getBackgroundColor(): string;
|
|
12
15
|
getFontColor(color: string): string;
|
|
13
16
|
getStackColor(color: string): string;
|
|
@@ -16,14 +19,8 @@ export declare class GraniteProgressBarComponent implements OnChanges {
|
|
|
16
19
|
getStringOfWidth(width: number): string;
|
|
17
20
|
checkStackTotal(): void;
|
|
18
21
|
getStackTotal(): number;
|
|
22
|
+
setLegendItems(): void;
|
|
19
23
|
ngOnChanges(changes: SimpleChanges): void;
|
|
20
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteProgressBarComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteProgressBarComponent, "granite-progress-bar", ["graniteProgressBar"], { "progressBarData": { "alias": "progressBarData"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; }, {}, never, never, false, never>;
|
|
22
|
-
}
|
|
23
|
-
export interface GraniteProgressInterface {
|
|
24
|
-
value: number;
|
|
25
|
-
label?: string;
|
|
26
|
-
valueLabel?: string;
|
|
27
|
-
backgroundColor?: string;
|
|
28
|
-
foregroundColor?: string;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GraniteProgressBarComponent, "granite-progress-bar", ["graniteProgressBar"], { "progressBarData": { "alias": "progressBarData"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
26
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface GraniteProgressInterface {
|
|
2
|
+
value: number;
|
|
3
|
+
label?: string;
|
|
4
|
+
valueLabel?: string;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
foregroundColor?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GraniteProgressLegendInterface {
|
|
9
|
+
label: string;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./progress-bar.component";
|
|
3
|
-
import * as i2 from "
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@
|
|
3
|
+
import * as i2 from "./progress-bar-legend/progress-bar-legend.component";
|
|
4
|
+
import * as i3 from "./progress-bar-legend-trigger-for.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "../core/core.module";
|
|
7
|
+
import * as i6 from "@ifsworld/granite-components/tooltip";
|
|
8
|
+
import * as i7 from "../icon/icon.module";
|
|
9
|
+
import * as i8 from "../button/button.module";
|
|
6
10
|
export declare class GraniteProgressBarModule {
|
|
7
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<GraniteProgressBarModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteProgressBarModule, [typeof i1.GraniteProgressBarComponent], [typeof
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<GraniteProgressBarModule, [typeof i1.GraniteProgressBarComponent, typeof i2.GraniteProgressBarLegendComponent, typeof i3.GraniteProgressBarLegendTriggerForDirective], [typeof i4.CommonModule, typeof i5.GraniteCoreModule, typeof i6.GraniteTooltipModule, typeof i7.GraniteIconModule, typeof i8.GraniteButtonModule], [typeof i1.GraniteProgressBarComponent]>;
|
|
9
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<GraniteProgressBarModule>;
|
|
10
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifsworld/granite-components",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": ">=17.3.4",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"esm": "./esm2022/date-picker/ifsworld-granite-components-date-picker.mjs",
|
|
36
36
|
"default": "./fesm2022/ifsworld-granite-components-date-picker.mjs"
|
|
37
37
|
},
|
|
38
|
-
"./tooltip": {
|
|
39
|
-
"types": "./tooltip/index.d.ts",
|
|
40
|
-
"esm2022": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
|
|
41
|
-
"esm": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
|
|
42
|
-
"default": "./fesm2022/ifsworld-granite-components-tooltip.mjs"
|
|
43
|
-
},
|
|
44
38
|
"./table": {
|
|
45
39
|
"types": "./table/index.d.ts",
|
|
46
40
|
"esm2022": "./esm2022/table/ifsworld-granite-components-table.mjs",
|
|
47
41
|
"esm": "./esm2022/table/ifsworld-granite-components-table.mjs",
|
|
48
42
|
"default": "./fesm2022/ifsworld-granite-components-table.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./tooltip": {
|
|
45
|
+
"types": "./tooltip/index.d.ts",
|
|
46
|
+
"esm2022": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
|
|
47
|
+
"esm": "./esm2022/tooltip/ifsworld-granite-components-tooltip.mjs",
|
|
48
|
+
"default": "./fesm2022/ifsworld-granite-components-tooltip.mjs"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false
|