@siemens/element-ng 47.0.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/LICENSE.md +20 -0
- package/README.md +27 -0
- package/application-header/index.d.ts +17 -0
- package/application-header/launchpad/si-launchpad-app.component.d.ts +21 -0
- package/application-header/launchpad/si-launchpad-factory.component.d.ts +83 -0
- package/application-header/launchpad/si-launchpad.model.d.ts +33 -0
- package/application-header/package.json +3 -0
- package/application-header/si-application-header.component.d.ts +60 -0
- package/application-header/si-header-account-item.component.d.ts +13 -0
- package/application-header/si-header-action-item-icon-base.directive.d.ts +26 -0
- package/application-header/si-header-action-item.base.d.ts +19 -0
- package/application-header/si-header-action-item.component.d.ts +9 -0
- package/application-header/si-header-actions.directive.d.ts +5 -0
- package/application-header/si-header-brand.directive.d.ts +5 -0
- package/application-header/si-header-collapsible-actions.component.d.ts +33 -0
- package/application-header/si-header-logo.directive.d.ts +6 -0
- package/application-header/si-header-navigation-item.component.d.ts +10 -0
- package/application-header/si-header-navigation.component.d.ts +11 -0
- package/application-header/si-header-selection-item.component.d.ts +12 -0
- package/application-header/si-header-siemens-logo.component.d.ts +20 -0
- package/avatar/index.d.ts +6 -0
- package/avatar/package.json +3 -0
- package/avatar/si-avatar-background-color.directive.d.ts +35 -0
- package/avatar/si-avatar.component.d.ts +50 -0
- package/common/decorators/index.d.ts +5 -0
- package/common/decorators/webcomponent.decorator.d.ts +6 -0
- package/common/helpers/animation.helpers.d.ts +10 -0
- package/common/helpers/global-events.helpers.d.ts +5 -0
- package/common/helpers/index.d.ts +10 -0
- package/common/helpers/overlay-helper.d.ts +24 -0
- package/common/helpers/positioning.helpers.d.ts +58 -0
- package/common/helpers/rtl.d.ts +6 -0
- package/common/helpers/track-by.helper.d.ts +27 -0
- package/common/index.d.ts +8 -0
- package/common/models/color-variant.model.d.ts +8 -0
- package/common/models/index.d.ts +8 -0
- package/common/models/menu.model.d.ts +85 -0
- package/common/models/positions.model.d.ts +18 -0
- package/common/models/status-type.model.d.ts +19 -0
- package/common/package.json +3 -0
- package/common/services/blink.service.d.ts +41 -0
- package/common/services/index.d.ts +8 -0
- package/common/services/scrollbar-helper.service.d.ts +17 -0
- package/common/services/si-uistate.service.d.ts +61 -0
- package/common/services/text-measure.service.d.ts +21 -0
- package/element-ng.scss +14 -0
- package/fesm2022/siemens-element-ng-application-header.mjs +747 -0
- package/fesm2022/siemens-element-ng-application-header.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-avatar.mjs +185 -0
- package/fesm2022/siemens-element-ng-avatar.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-common.mjs +946 -0
- package/fesm2022/siemens-element-ng-common.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-header-dropdown.mjs +384 -0
- package/fesm2022/siemens-element-ng-header-dropdown.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-icon.mjs +236 -0
- package/fesm2022/siemens-element-ng-icon.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-link.mjs +233 -0
- package/fesm2022/siemens-element-ng-link.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-resize-observer.mjs +332 -0
- package/fesm2022/siemens-element-ng-resize-observer.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-theme.mjs +770 -0
- package/fesm2022/siemens-element-ng-theme.mjs.map +1 -0
- package/fesm2022/siemens-element-ng-translate.mjs +22 -0
- package/fesm2022/siemens-element-ng-translate.mjs.map +1 -0
- package/fesm2022/siemens-element-ng.mjs +12 -0
- package/fesm2022/siemens-element-ng.mjs.map +1 -0
- package/header-dropdown/index.d.ts +9 -0
- package/header-dropdown/package.json +3 -0
- package/header-dropdown/si-header-dropdown-item.component.d.ts +23 -0
- package/header-dropdown/si-header-dropdown-items-factory.component.d.ts +14 -0
- package/header-dropdown/si-header-dropdown-trigger.directive.d.ts +57 -0
- package/header-dropdown/si-header-dropdown.component.d.ts +20 -0
- package/header-dropdown/si-header.model.d.ts +37 -0
- package/icon/element-icons.d.ts +12 -0
- package/icon/index.d.ts +9 -0
- package/icon/package.json +3 -0
- package/icon/si-icon-next.component.d.ts +68 -0
- package/icon/si-icon.component.d.ts +23 -0
- package/icon/si-icon.module.d.ts +7 -0
- package/icon/si-icons.d.ts +31 -0
- package/index.d.ts +5 -0
- package/link/aria-current.model.d.ts +5 -0
- package/link/index.d.ts +8 -0
- package/link/link.model.d.ts +57 -0
- package/link/package.json +3 -0
- package/link/si-link-action.service.d.ts +17 -0
- package/link/si-link.directive.d.ts +42 -0
- package/link/si-link.module.d.ts +7 -0
- package/package.json +86 -0
- package/public-api.d.ts +5 -0
- package/resize-observer/index.d.ts +8 -0
- package/resize-observer/package.json +3 -0
- package/resize-observer/resize-observer.service.d.ts +41 -0
- package/resize-observer/si-resize-observer.directive.d.ts +29 -0
- package/resize-observer/si-resize-observer.module.d.ts +8 -0
- package/resize-observer/si-responsive-container.directive.d.ts +73 -0
- package/theme/index.d.ts +7 -0
- package/theme/package.json +3 -0
- package/theme/si-theme-store.d.ts +82 -0
- package/theme/si-theme.model.d.ts +48 -0
- package/theme/si-theme.service.d.ts +129 -0
- package/translate/index.d.ts +7 -0
- package/translate/package.json +3 -0
- package/translate/si-translatable-keys.interface.d.ts +11 -0
- package/translate/si-translatable-overrides.provider.d.ts +7 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { ConnectedOverlayPositionChange, ConnectionPositionPair, FlexibleConnectedPositionStrategy, Overlay, OverlayRef, PositionStrategy } from '@angular/cdk/overlay';
|
|
6
|
+
import { ElementRef } from '@angular/core';
|
|
7
|
+
import { positions } from '../models/positions.model';
|
|
8
|
+
export declare function makePositionStrategy(elementRef: ElementRef<any> | undefined, overlay: Overlay, placement: keyof typeof positions | ConnectionPositionPair[], constrain?: boolean, center?: boolean): PositionStrategy;
|
|
9
|
+
export declare function makeOverlay(positionStrategy: PositionStrategy, overlay: Overlay, hasBackdrop: boolean): OverlayRef;
|
|
10
|
+
export declare function getOverlay(elementRef: ElementRef<any>, overlay: Overlay, hasBackdrop: boolean, placement: keyof typeof positions | ConnectionPositionPair[], constrain?: boolean, center?: boolean): OverlayRef;
|
|
11
|
+
export declare function getPositionStrategy(overlayref: OverlayRef): FlexibleConnectedPositionStrategy | undefined;
|
|
12
|
+
export declare function getOverlayPositions(elementRef: ElementRef<any>, placement: keyof typeof positions | ConnectionPositionPair[], center?: boolean): ConnectionPositionPair[];
|
|
13
|
+
export declare function hasTrigger(trigger: string, triggers?: string): boolean;
|
|
14
|
+
export interface OverlayArrowPosition {
|
|
15
|
+
left?: number;
|
|
16
|
+
right?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* calculates the arrow position from left/right for tooltips, popovers, etc
|
|
20
|
+
* @param change - the event from the position strategy
|
|
21
|
+
* @param overlay - ElementRef for the overlay content, i.e. the popover/tooltip component
|
|
22
|
+
* @param anchor - ElementRef for the anchoring element, i.e. the trigger of the popover/tooltip
|
|
23
|
+
*/
|
|
24
|
+
export declare function calculateOverlayArrowPosition(change: ConnectedOverlayPositionChange, overlay: ElementRef, anchor?: ElementRef): OverlayArrowPosition;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type Direction = 'down' | 'up' | 'start' | 'end';
|
|
2
|
+
export type PlacementBasicVertical = 'top' | 'bottom';
|
|
3
|
+
export type PlacementBasic = 'start' | 'end' | PlacementBasicVertical;
|
|
4
|
+
export type Placement = '' | PlacementBasic | `${PlacementBasic} ${PlacementBasic}`;
|
|
5
|
+
export type Align = 'start' | 'center' | 'end';
|
|
6
|
+
export declare const AXIS_X: {
|
|
7
|
+
readonly axis: "X";
|
|
8
|
+
readonly directionRegular: "end";
|
|
9
|
+
readonly directionReverse: "start";
|
|
10
|
+
readonly upperBound: "left";
|
|
11
|
+
readonly lowerBound: "right";
|
|
12
|
+
readonly size: "width";
|
|
13
|
+
readonly windowSize: "innerWidth";
|
|
14
|
+
};
|
|
15
|
+
export declare const AXIS_Y: {
|
|
16
|
+
readonly axis: "Y";
|
|
17
|
+
readonly directionRegular: "down";
|
|
18
|
+
readonly directionReverse: "up";
|
|
19
|
+
readonly upperBound: "top";
|
|
20
|
+
readonly lowerBound: "bottom";
|
|
21
|
+
readonly size: "height";
|
|
22
|
+
readonly windowSize: "innerHeight";
|
|
23
|
+
};
|
|
24
|
+
export declare const BOUNDING_RECT_WINDOW: {
|
|
25
|
+
getBoundingClientRect: () => {
|
|
26
|
+
top: number;
|
|
27
|
+
left: number;
|
|
28
|
+
bottom: number;
|
|
29
|
+
right: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const resolveReference: (hostElement: HTMLElement, reference: string) => HTMLElement | null;
|
|
33
|
+
export declare const getContentPositionString: (params: {
|
|
34
|
+
contentElement: HTMLElement;
|
|
35
|
+
direction: Direction;
|
|
36
|
+
placement: Placement;
|
|
37
|
+
placementReferenceElement: HTMLElement;
|
|
38
|
+
align: Align;
|
|
39
|
+
rtl?: boolean;
|
|
40
|
+
}) => string;
|
|
41
|
+
export declare const responsivelyCheckDirection: (params: {
|
|
42
|
+
isScrolling?: boolean;
|
|
43
|
+
currentDirection: Direction;
|
|
44
|
+
contentElements: HTMLElement[];
|
|
45
|
+
hostElement: HTMLElement | null;
|
|
46
|
+
placement: Placement;
|
|
47
|
+
placementReferenceElement: HTMLElement;
|
|
48
|
+
align: Align;
|
|
49
|
+
responsiveDirectionToPlacement: boolean;
|
|
50
|
+
closeOnPlacementReferenceScrollOut: boolean;
|
|
51
|
+
closeOnContentScrollOut: boolean;
|
|
52
|
+
minSpaceThresholdFactor?: number;
|
|
53
|
+
placementReverse?: Placement;
|
|
54
|
+
rtl?: boolean;
|
|
55
|
+
}) => {
|
|
56
|
+
responsiveDirection?: Direction;
|
|
57
|
+
close: boolean;
|
|
58
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { TrackByFunction } from '@angular/core';
|
|
6
|
+
/**
|
|
7
|
+
* Creates a trackByFunction for ngFor, that tracks an Item by its identity.
|
|
8
|
+
* It should be used with a generic parameter, to generate a proper type:
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* @Input() trackByFunction = buildTrackByIdentity<ItemType>()
|
|
13
|
+
* ```
|
|
14
|
+
* @deprecated use the new control-flow syntax
|
|
15
|
+
*/
|
|
16
|
+
export declare const buildTrackByIdentity: <T>() => TrackByFunction<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a trackByFunction for ngFor, that tracks an Item by its index.
|
|
19
|
+
* It should be used with a generic parameter, to generate a proper type:
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```
|
|
23
|
+
* @Input() trackByFunction = buildTrackByIdentity<ItemType>()
|
|
24
|
+
* ```
|
|
25
|
+
* @deprecated use the new control-flow syntax
|
|
26
|
+
*/
|
|
27
|
+
export declare const buildTrackByIndex: <T>() => TrackByFunction<T>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { Link } from '@siemens/element-ng/link';
|
|
6
|
+
/**
|
|
7
|
+
* The MenuItem is used to configure clickable items in menus.
|
|
8
|
+
* They support a name, link, icons and sub-menu items.
|
|
9
|
+
*
|
|
10
|
+
* @deprecated This interface should no longer be used.
|
|
11
|
+
* Use a corresponding alternative based on your use case:
|
|
12
|
+
* - for {@link SiMenuFactoryComponent} use {@link @siemens/element-ng/menu#MenuItem}
|
|
13
|
+
* - for {@link SiContentActionBarComponent} use {@link @siemens/element-ng/menu#MenuItem} and {@link ContentActionBarMainItem}
|
|
14
|
+
* - for {@link SiNavbarVerticalComponent} use {@link NavbarVerticalItem}
|
|
15
|
+
* - for {@link @simpl/dashboards-ng#SiFlexibleDashboardComponent}
|
|
16
|
+
* use {@link @simpl/dashboards-ng#DashboardToolbarItem}
|
|
17
|
+
*/
|
|
18
|
+
export interface MenuItem extends Link {
|
|
19
|
+
/**
|
|
20
|
+
* An optional id to uniquely identify the menu item.
|
|
21
|
+
*/
|
|
22
|
+
id?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The web font icon class name (e.g. element-settings-outline).
|
|
25
|
+
*/
|
|
26
|
+
icon?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The value for an image src tag. Maybe a relative or absolute link to an
|
|
29
|
+
* jpg or gif image.
|
|
30
|
+
*/
|
|
31
|
+
image?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A navigation bar item can have a sub-menu, if these items are set. They
|
|
34
|
+
* define the sub-menu content.
|
|
35
|
+
*/
|
|
36
|
+
items?: MenuItem[];
|
|
37
|
+
/**
|
|
38
|
+
* If the menu item has children you can specify
|
|
39
|
+
* if they are visible or not.
|
|
40
|
+
*/
|
|
41
|
+
expanded?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Defines if only the icon is shown in the default navigation bar.
|
|
44
|
+
*/
|
|
45
|
+
iconOnly?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Defines if custom content is chosen in account dropdown
|
|
48
|
+
* (otherwise accountItems are used)
|
|
49
|
+
*/
|
|
50
|
+
customContent?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Defines the content of the optional badge. Should be a number or something like "100+".
|
|
53
|
+
* if undefined or empty string, no badge is displayed
|
|
54
|
+
*/
|
|
55
|
+
badge?: string | number;
|
|
56
|
+
/**
|
|
57
|
+
* Defines the background color of the badge. Default is specific to Element flavour.
|
|
58
|
+
*/
|
|
59
|
+
badgeColor?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Defines the badge style
|
|
62
|
+
*/
|
|
63
|
+
badgeStyle?: 'inline' | 'dot' | '';
|
|
64
|
+
/**
|
|
65
|
+
* Show a dot badge without content?
|
|
66
|
+
*/
|
|
67
|
+
badgeDot?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* For single/multi choice items: the kind of icon to show.
|
|
70
|
+
*/
|
|
71
|
+
selectionState?: 'check' | 'radio' | '';
|
|
72
|
+
/**
|
|
73
|
+
* Type to distinguish between check and radio menu items. Needs to be set for correct interaction and used for a11y.
|
|
74
|
+
*/
|
|
75
|
+
type?: 'check' | 'radio';
|
|
76
|
+
/**
|
|
77
|
+
* Whether the menu item should be displayed as a heading/title, will also disable links and actions.
|
|
78
|
+
*/
|
|
79
|
+
isHeading?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the menu items sub-menu should open upwards instead of downwards.
|
|
82
|
+
*/
|
|
83
|
+
dropUpwards?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export type NavbarItem = MenuItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
import { ConnectionPositionPair } from '@angular/cdk/overlay';
|
|
6
|
+
export declare const positionTopCenter: ConnectionPositionPair;
|
|
7
|
+
export declare const positionTopStart: ConnectionPositionPair;
|
|
8
|
+
export declare const positionTopEnd: ConnectionPositionPair;
|
|
9
|
+
export declare const positionBottomCenter: ConnectionPositionPair;
|
|
10
|
+
export declare const positionBottomStart: ConnectionPositionPair;
|
|
11
|
+
export declare const positionBottomEnd: ConnectionPositionPair;
|
|
12
|
+
export declare const positions: {
|
|
13
|
+
top: ConnectionPositionPair[];
|
|
14
|
+
end: ConnectionPositionPair[];
|
|
15
|
+
bottom: ConnectionPositionPair[];
|
|
16
|
+
start: ConnectionPositionPair[];
|
|
17
|
+
auto: ConnectionPositionPair[];
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Siemens 2016 - 2025.
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
export type StatusType = 'success' | 'info' | 'warning' | 'danger';
|
|
6
|
+
export type ExtendedStatusType = StatusType | 'caution' | 'critical' | 'unknown';
|
|
7
|
+
export type EntityStatusType = ExtendedStatusType | 'pending' | 'progress';
|
|
8
|
+
export type AccentLineType = StatusType | 'caution' | 'primary' | 'inactive';
|
|
9
|
+
export interface StatusIcon {
|
|
10
|
+
icon: string;
|
|
11
|
+
color: string;
|
|
12
|
+
stacked: string;
|
|
13
|
+
stackedColor: string;
|
|
14
|
+
background: string;
|
|
15
|
+
severity: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const STATUS_ICON: {
|
|
18
|
+
[key in EntityStatusType]: StatusIcon;
|
|
19
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* A global blink pulse generator for synchronized blinking patterns across an entire application.
|
|
4
|
+
* Use to trigger any blinking by subscribing to `pulse$`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BlinkService {
|
|
7
|
+
private pause$;
|
|
8
|
+
private off$;
|
|
9
|
+
private on$;
|
|
10
|
+
/**
|
|
11
|
+
* Blink pulse. Subscribe to it to toggle `on` CSS class when true, `off` CSS class when `false`.
|
|
12
|
+
* Do animations using CSS transitions
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue
|
|
15
|
+
* ```
|
|
16
|
+
* timer(0, 1400).pipe(
|
|
17
|
+
* map(count => count % 2 === 0),
|
|
18
|
+
* distinctUntilChanged(),
|
|
19
|
+
* takeUntil(this.off$),
|
|
20
|
+
* endWith(false),
|
|
21
|
+
* repeat({ delay: () => this.on$ }),
|
|
22
|
+
* share()
|
|
23
|
+
* )
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
readonly pulse$: import("rxjs").Observable<boolean>;
|
|
27
|
+
/**
|
|
28
|
+
* Pause the blinking.
|
|
29
|
+
*/
|
|
30
|
+
pause(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Resume the blinking.
|
|
33
|
+
*/
|
|
34
|
+
resume(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the blinking is paused or not.
|
|
37
|
+
*/
|
|
38
|
+
isPaused(): boolean;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BlinkService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BlinkService>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Gets the width of the scrollbar. Nesc for windows
|
|
4
|
+
* http://stackoverflow.com/a/13382873/888165
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScrollbarHelper {
|
|
7
|
+
private document;
|
|
8
|
+
/**
|
|
9
|
+
* The width of the scrollbar.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue this.getWidth()
|
|
12
|
+
*/
|
|
13
|
+
readonly width: number;
|
|
14
|
+
private getWidth;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScrollbarHelper, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScrollbarHelper>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { InjectionToken, Provider, Type } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Interface that defines a UIStateStore.
|
|
5
|
+
* It must be provided via {@link provideSiUiState}.
|
|
6
|
+
*/
|
|
7
|
+
export interface UIStateStorage {
|
|
8
|
+
/**
|
|
9
|
+
* Saves data under a specific stateId.
|
|
10
|
+
* Already existing data for that stateId should be overridden.
|
|
11
|
+
* Asynchronous implementations must return a {@link Promise} and resolve it once saving was completed.
|
|
12
|
+
*
|
|
13
|
+
* Errors should be handled by the implementation.
|
|
14
|
+
* The `SiUIStateService` does not handle errors.
|
|
15
|
+
*/
|
|
16
|
+
save(stateId: string, data: string): void | Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Loads data for a specific stateId.
|
|
19
|
+
* Can be asynchronous.
|
|
20
|
+
*
|
|
21
|
+
* Errors should be handled by the implementation.
|
|
22
|
+
* The `SiUIStateService` does not handle errors.
|
|
23
|
+
*
|
|
24
|
+
* @returns The data or undefined if the data does not exist.
|
|
25
|
+
* Asynchronous implementations must return a {@link Promise} containing the data.
|
|
26
|
+
*/
|
|
27
|
+
load(stateId: string): string | undefined | null | Promise<string | undefined | null>;
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const SI_UI_STATE_SERVICE: InjectionToken<SiUIStateService>;
|
|
31
|
+
/**
|
|
32
|
+
* Service to save and load UI states.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
declare class SiUIStateService {
|
|
36
|
+
private storage;
|
|
37
|
+
/**
|
|
38
|
+
* Saves the provided state in the storage.
|
|
39
|
+
* @param stateId - The unique id or key under which the state shall be saved.
|
|
40
|
+
* @param state - The state to be saved.
|
|
41
|
+
* @param version - The version of the state object.
|
|
42
|
+
* This can be used to migrate state objects.
|
|
43
|
+
*/
|
|
44
|
+
save<TState>(stateId: string, state: TState, version?: number): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Loads and returns the state for the given stateId and version.
|
|
47
|
+
* @param stateId - The unique id or key for which the state shall be loaded.
|
|
48
|
+
* @param version - The version of the state object.
|
|
49
|
+
* This can be used to migrate state objects.
|
|
50
|
+
* @returns A Promise containing the state or undefined if the state does not exist or the version did not match.
|
|
51
|
+
*/
|
|
52
|
+
load<TState = unknown>(stateId: string, version?: number): PromiseLike<TState | undefined>;
|
|
53
|
+
private readData;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SiUIStateService, never>;
|
|
55
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SiUIStateService>;
|
|
56
|
+
}
|
|
57
|
+
export type { SiUIStateService };
|
|
58
|
+
/** Enables the automatic storage of UI state for enabled components. */
|
|
59
|
+
export declare const provideSiUiState: (config?: {
|
|
60
|
+
store?: Type<UIStateStorage>;
|
|
61
|
+
}) => Provider[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface FontStyleOverride {
|
|
3
|
+
fontStyle?: string;
|
|
4
|
+
fontVariant?: string;
|
|
5
|
+
fontWeight?: string;
|
|
6
|
+
fontSize?: string;
|
|
7
|
+
fontFamily?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class TextMeasureService {
|
|
10
|
+
private measureCanvas?;
|
|
11
|
+
private defaultFont?;
|
|
12
|
+
private document;
|
|
13
|
+
/** Measure text width in pixel. */
|
|
14
|
+
measureText(text: string, fontRef?: HTMLElement | string, overrides?: FontStyleOverride): number;
|
|
15
|
+
/** Get font styles for `font` CSS short-hand property. */
|
|
16
|
+
getFontStyle(element: HTMLElement, overrides?: FontStyleOverride): string;
|
|
17
|
+
private ensureCanvas;
|
|
18
|
+
private setFontStyle;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextMeasureService, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TextMeasureService>;
|
|
21
|
+
}
|
package/element-ng.scss
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use '@angular/cdk/overlay' with (
|
|
2
|
+
// these muse be higher than the Bootstrap $zindex-modal, otherwise popover/tooltips won't work inside modals
|
|
3
|
+
$overlay-container-z-index: 1070,
|
|
4
|
+
$overlay-z-index: 1070,
|
|
5
|
+
$overlay-backdrop-z-index: 1070
|
|
6
|
+
);
|
|
7
|
+
@use '@angular/cdk/a11y';
|
|
8
|
+
|
|
9
|
+
@include overlay.overlay();
|
|
10
|
+
@include a11y.a11y-visually-hidden();
|
|
11
|
+
|
|
12
|
+
.cdk-drag-preview {
|
|
13
|
+
z-index: overlay.$overlay-z-index !important; // stylelint-disable-line declaration-no-important
|
|
14
|
+
}
|