@kms-ngx-ui/presentational 14.1.1 → 14.1.2

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.
Files changed (36) hide show
  1. package/esm2020/lib/directives/directives.module.mjs +8 -3
  2. package/esm2020/lib/directives/size.directive.mjs +21 -0
  3. package/esm2020/lib/parent-components/form-control.component.mjs +2 -2
  4. package/esm2020/lib/parent-components/form.component.mjs +11 -5
  5. package/esm2020/lib/services/viewport.service.mjs +177 -71
  6. package/esm2020/lib/ui/back-to-top/back-to-top.component.mjs +1 -1
  7. package/esm2020/lib/ui/dropdown-from-data/dropdown-from-data.component.mjs +4 -1
  8. package/esm2020/lib/ui/file-input/file-input.component.mjs +8 -8
  9. package/esm2020/lib/ui/flyout/flyout.component.mjs +6 -5
  10. package/esm2020/lib/ui/icon/icon.component.mjs +6 -3
  11. package/esm2020/lib/ui/icon/iconSize.enum.mjs +12 -1
  12. package/esm2020/lib/ui/image-slider/image-slider.component.mjs +1 -1
  13. package/esm2020/lib/ui/kms-accordion-item/kms-accordion-item.component.mjs +1 -1
  14. package/esm2020/lib/ui/map/map.component.mjs +3 -3
  15. package/esm2020/lib/ui/radiobutton/radiobutton.component.mjs +9 -5
  16. package/esm2020/lib/ui/tooltip-icon/tooltip-icon.component.mjs +7 -6
  17. package/esm2020/public-api.mjs +2 -1
  18. package/fesm2015/kms-ngx-ui-presentational.mjs +300 -144
  19. package/fesm2015/kms-ngx-ui-presentational.mjs.map +1 -1
  20. package/fesm2020/kms-ngx-ui-presentational.mjs +301 -146
  21. package/fesm2020/kms-ngx-ui-presentational.mjs.map +1 -1
  22. package/lib/directives/directives.module.d.ts +4 -2
  23. package/lib/directives/size.directive.d.ts +10 -0
  24. package/lib/services/viewport.service.d.ts +58 -9
  25. package/lib/ui/dropdown-from-data/dropdown-from-data.component.d.ts +1 -0
  26. package/lib/ui/file-input/file-input.component.d.ts +2 -2
  27. package/lib/ui/icon/icon.component.d.ts +7 -1
  28. package/lib/ui/icon/iconSize.enum.d.ts +10 -0
  29. package/lib/ui/radiobutton/radiobutton.component.d.ts +2 -1
  30. package/lib/ui/tooltip-icon/tooltip-icon.component.d.ts +2 -2
  31. package/package.json +1 -1
  32. package/public-api.d.ts +1 -0
  33. package/src/lib/ui/back-to-top/back-to-top.component.scss +2 -3
  34. package/src/lib/ui/icon/icon.component.scss +2 -36
  35. package/src/styles/animations.scss +47 -0
  36. package/src/styles/styles.scss +1 -0
@@ -3,9 +3,11 @@ import * as i1 from "./swipe.directive";
3
3
  import * as i2 from "./mousewheel.directive";
4
4
  import * as i3 from "./sum-of-height.directive";
5
5
  import * as i4 from "./tooltip.directive";
6
- import * as i5 from "@angular/common";
6
+ import * as i5 from "./size.directive";
7
+ import * as i6 from "@angular/common";
7
8
  export declare class DirectivesModule {
9
+ SizeDirective: any;
8
10
  static ɵfac: i0.ɵɵFactoryDeclaration<DirectivesModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof i1.SwipeDirective, typeof i2.MouseWheelDirective, typeof i3.GetMaxHeightDirective, typeof i4.TooltipDirective], [typeof i5.CommonModule], [typeof i1.SwipeDirective, typeof i2.MouseWheelDirective, typeof i3.GetMaxHeightDirective, typeof i4.TooltipDirective]>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof i1.SwipeDirective, typeof i2.MouseWheelDirective, typeof i3.GetMaxHeightDirective, typeof i4.TooltipDirective, typeof i5.SizeDirective], [typeof i6.CommonModule], [typeof i1.SwipeDirective, typeof i2.MouseWheelDirective, typeof i3.GetMaxHeightDirective, typeof i4.TooltipDirective, typeof i5.SizeDirective]>;
10
12
  static ɵinj: i0.ɵɵInjectorDeclaration<DirectivesModule>;
11
13
  }
@@ -0,0 +1,10 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SizeDirective {
4
+ private elementRef;
5
+ size: string;
6
+ constructor(elementRef: ElementRef);
7
+ ngOnInit(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SizeDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SizeDirective, "[size]", never, { "size": "size"; }, {}, never, never, false>;
10
+ }
@@ -1,20 +1,33 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
+ export declare class SimpleBreakpoint {
5
+ constructor(data?: Partial<SimpleBreakpoint>);
6
+ Number: number;
7
+ Name: string;
8
+ MaximumPixels: number;
9
+ }
10
+ export declare class Breakpoint {
11
+ constructor(data?: Partial<SimpleBreakpoint>);
12
+ Number: number;
13
+ Name: string;
14
+ Low: number;
15
+ High: number;
16
+ }
4
17
  /**
5
18
  * Service to get viewport
6
19
  */
7
20
  export declare class ViewportService implements OnDestroy {
8
21
  private platformId;
9
- readonly viewports: {
10
- name: string;
11
- low: number;
12
- high: number;
13
- }[];
22
+ document: Document;
23
+ readonly simpleBreakpoints: SimpleBreakpoint[];
24
+ readonly breakpoints: Breakpoint[];
14
25
  private viewportChangedSubscriber;
15
26
  private viewportResizedSubscriber;
16
27
  private currentViewport;
17
- constructor(platformId: Object);
28
+ private currentViewportObject;
29
+ private isBrowser;
30
+ constructor(platformId: Object, document: Document);
18
31
  /**
19
32
  * Get window height
20
33
  */
@@ -36,6 +49,16 @@ export declare class ViewportService implements OnDestroy {
36
49
  * @returns string
37
50
  */
38
51
  getCurrentViewPort(): string;
52
+ /**
53
+ * Returns the current viewport MQ as object with all informations
54
+ * @returns string
55
+ */
56
+ getCurrentViewPortObject(): Breakpoint;
57
+ /**
58
+ * Returns the current viewport as number
59
+ * @returns string
60
+ */
61
+ getCurrentViewPortNumber(): number;
39
62
  /**
40
63
  * Provides mq´s as string
41
64
  */
@@ -44,6 +67,9 @@ export declare class ViewportService implements OnDestroy {
44
67
  * Provides the current window width as number
45
68
  */
46
69
  getViewportResizedObserver(): Observable<number>;
70
+ /**
71
+ * Scroll to element
72
+ */
47
73
  scrollToElementId(el: string, alignCenter?: boolean): void;
48
74
  /**
49
75
  * Helper function that scrolls to the given markup element.
@@ -56,7 +82,27 @@ export declare class ViewportService implements OnDestroy {
56
82
  * @param top - top position value
57
83
  */
58
84
  scrollTop(top: number): void;
59
- ngOnDestroy(): void;
85
+ /**
86
+ * If orientation is portrait
87
+ */
88
+ isPortrait(): boolean;
89
+ /**
90
+ * If orientation is landscape
91
+ */
92
+ isLandscape(): boolean;
93
+ /**
94
+ * If mobile breakpoint (below tablet)
95
+ */
96
+ isMobile(): boolean;
97
+ /**
98
+ * Get height of an element
99
+ * @deprecated
100
+ */
101
+ calculateFullscreenElementsheight(id: string, defaultheight: string, extra: number): string;
102
+ /**
103
+ * Get height of an element
104
+ */
105
+ calculateFullscreenElementsHeight(id: string, defaultheight: string, extra: number): string;
60
106
  /**
61
107
  * If viewport changed
62
108
  * @event
@@ -67,8 +113,11 @@ export declare class ViewportService implements OnDestroy {
67
113
  * @param width Width to get the according MQ for
68
114
  */
69
115
  private convertWidthToMediaQuery;
70
- isPortrait(): boolean;
71
- isLandscape(): boolean;
116
+ /**
117
+ * Get the breakpoint/device name like mobile,tablet,desktop, high
118
+ */
119
+ getSimpleBreakpoint(screenSize: number): SimpleBreakpoint;
120
+ ngOnDestroy(): void;
72
121
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
73
122
  static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
74
123
  }
@@ -50,6 +50,7 @@ export declare class DropdownFromDataComponent extends FormControlParentComponen
50
50
  interface ITranslation {
51
51
  path: string;
52
52
  isPrefix?: boolean;
53
+ useKeyAsValue?: boolean;
53
54
  service: any;
54
55
  }
55
56
  export {};
@@ -1,8 +1,8 @@
1
1
  import { OnInit, Renderer2, EventEmitter, ApplicationRef, ChangeDetectorRef } from '@angular/core';
2
2
  import { ControlValueAccessor, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
3
3
  import { Subscription } from 'rxjs';
4
- import { IconSize } from '../../models/iconSize.enum';
5
4
  import { AttachedFileDTO } from '../../models/types/attached-file-dto.model';
5
+ import { IconSizePx } from '../icon/iconSize.enum';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class FileInputComponent implements ControlValueAccessor, OnInit {
8
8
  formBuilder: UntypedFormBuilder;
@@ -20,7 +20,7 @@ export declare class FileInputComponent implements ControlValueAccessor, OnInit
20
20
  form: UntypedFormGroup;
21
21
  subscriptions: Subscription[];
22
22
  newImageLoading: boolean;
23
- IconSize: typeof IconSize;
23
+ IconSizePx: typeof IconSizePx;
24
24
  formDataChanged: EventEmitter<UntypedFormGroup>;
25
25
  /**
26
26
  * Constructor
@@ -22,8 +22,14 @@ export declare class IconComponent implements OnInit {
22
22
  iconStyle: any;
23
23
  /**
24
24
  * Optional: Different size via CSS inline style.
25
+ * @deprecated. Please use size instead
25
26
  */
26
27
  iconSize: IconSize;
28
+ /**
29
+ * Optional: Different size via CSS inline style.
30
+ * @deprecated. Please use size instead
31
+ */
32
+ size?: string;
27
33
  /**
28
34
  * Dont use icon sprite
29
35
  */
@@ -38,5 +44,5 @@ export declare class IconComponent implements OnInit {
38
44
  constructor(sanitizer: DomSanitizer);
39
45
  ngOnInit(): void;
40
46
  static ɵfac: i0.ɵɵFactoryDeclaration<IconComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "kms-icon", never, { "icon": "icon"; "iconClass": "iconClass"; "iconStyle": "iconStyle"; "iconSize": "iconSize"; "dontUseSprite": "dontUseSprite"; }, {}, never, never, false>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "kms-icon", never, { "icon": "icon"; "iconClass": "iconClass"; "iconStyle": "iconStyle"; "iconSize": "iconSize"; "size": "size"; "dontUseSprite": "dontUseSprite"; }, {}, never, never, false>;
42
48
  }
@@ -13,3 +13,13 @@ export declare enum IconSize {
13
13
  XXXL = "size-1024",
14
14
  NONE = "NONE"
15
15
  }
16
+ export declare enum IconSizePx {
17
+ TINY = 16,
18
+ SMALLER = 20,
19
+ SMALL = 32,
20
+ MEDIUM = 64,
21
+ LARGE = 128,
22
+ XL = 256,
23
+ XXL = 512,
24
+ XXXL = 1024
25
+ }
@@ -11,6 +11,7 @@ export declare class RadioButtonComponent extends ActionsParentComponent impleme
11
11
  * Internal description id. Will be send in the output event when the radio button is selected.
12
12
  */
13
13
  id: string;
14
+ radioButtonSize: number;
14
15
  formControl: any;
15
16
  selectAction(id: string): void;
16
17
  constructor();
@@ -22,5 +23,5 @@ export declare class RadioButtonComponent extends ActionsParentComponent impleme
22
23
  registerOnChange(fn: any): void;
23
24
  registerOnTouched(fn: any): void;
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "kms-radiobutton", never, { "name": "name"; "id": "id"; "formControl": "formControl"; }, {}, never, ["*"], false>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "kms-radiobutton", never, { "name": "name"; "id": "id"; "radioButtonSize": "radioButtonSize"; "formControl": "formControl"; }, {}, never, ["*"], false>;
26
27
  }
@@ -1,4 +1,4 @@
1
- import { IconSize } from '../../models';
1
+ import { IconSizePx } from '../icon/iconSize.enum';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class TooltipIconComponent {
4
4
  tooltipTitle: string;
@@ -7,7 +7,7 @@ export declare class TooltipIconComponent {
7
7
  tooltipLinkUrl: string;
8
8
  placement: string;
9
9
  delay: number;
10
- IconSize: typeof IconSize;
10
+ IconSizePx: typeof IconSizePx;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<TooltipIconComponent, never>;
12
12
  static ɵcmp: i0.ɵɵComponentDeclaration<TooltipIconComponent, "kms-tooltip-icon", never, { "tooltipTitle": "tooltipTitle"; "tooltipText": "tooltipText"; "tooltipLinkText": "tooltipLinkText"; "tooltipLinkUrl": "tooltipLinkUrl"; "placement": "placement"; "delay": "delay"; }, {}, never, never, false>;
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kms-ngx-ui/presentational",
3
- "version": "14.1.1",
3
+ "version": "14.1.2",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "14.2.7",
6
6
  "@angular/common": "14.3.0",
package/public-api.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './lib/kms-ngx-ui-presentational.component';
3
3
  export * from './lib/kms-ngx-ui-presentational.module';
4
4
  export * from './lib/pipes/custom-pipes.module';
5
5
  export * from './lib/directives/directives.module';
6
+ export * from './lib/directives/size.directive';
6
7
  export * from './lib/models/iconSize.enum';
7
8
  export * from './lib/models/salutation.enum';
8
9
  export * from './lib/ui/checkbox/checkbox.component';
@@ -11,15 +11,14 @@
11
11
  cursor: pointer;
12
12
  align-items: center;
13
13
  z-index: 999999;
14
- background-color: white;
15
14
  border-radius: 50%;
16
15
 
17
16
  width: $size;
18
17
  height: $size;
19
18
  &-inner{
20
- margin: 2px;
21
19
  border-radius: 50%;
22
20
  background-color: var(--primaryColor);
21
+ border: 2px solid white;
23
22
 
24
23
  width: calc(#{$size} - 4px);
25
24
  height: calc(#{$size} - 4px);
@@ -31,7 +30,7 @@
31
30
  }
32
31
 
33
32
  }
34
- @media (max-width: $responsive-breakpoint) {
33
+ @media (max-width: $responsive-breakpoint-l) {
35
34
  .scrollToTop {
36
35
  bottom: calc(#{$size} / 2);
37
36
  right: calc(#{$size} / 2);
@@ -62,8 +62,8 @@
62
62
  &-primary svg use{
63
63
  fill: var(--primaryColor);
64
64
  }
65
- &-secondary svg use{
66
- fill: var(--primaryColor);
65
+ &-accent svg use{
66
+ fill: var(--accentColor);
67
67
  }
68
68
  &-disabled svg use{
69
69
  fill: var(--gray04);
@@ -111,39 +111,5 @@
111
111
  pointer-events: none;
112
112
  }
113
113
 
114
- &.is-rotating45 {
115
- animation-name: spinanimation;
116
- animation-duration: 3000ms;
117
- transform: rotate(45deg);
118
- }
119
-
120
- &.is-rotating90 {
121
- animation-name: spinanimation;
122
- animation-duration: 3000ms;
123
- transform: rotate(90deg);
124
- }
125
-
126
- &.is-rotating180 {
127
- animation-name: spinanimation180;
128
- animation-duration: 3000ms;
129
- }
130
-
131
- &.is-rotating45Anti {
132
- animation-name: spinanimation;
133
- animation-duration: 3000ms;
134
- transform: rotate(-45deg);
135
- }
136
-
137
- &.is-rotating90Anti {
138
- animation-name: spinanimation;
139
- animation-duration: 3000ms;
140
- transform: rotate(-90deg);
141
- }
142
-
143
- &.is-rotating180Anti {
144
- animation-name: spinanimation;
145
- animation-duration: 3000ms;
146
- transform: rotate(-180deg);
147
- }
148
114
  }
149
115
  }
@@ -0,0 +1,47 @@
1
+ // Animations for element
2
+ @keyframes spinanimation {
3
+ from {
4
+ transform: rotate(0deg);
5
+ }
6
+
7
+ to {
8
+ transform: rotate(360deg);
9
+ }
10
+ }
11
+
12
+ .is-rotating{
13
+ &45 {
14
+ animation-name: spinanimation;
15
+ animation-duration: 3000ms;
16
+ transform: rotate(45deg);
17
+ }
18
+
19
+ &90 {
20
+ animation-name: spinanimation;
21
+ animation-duration: 3000ms;
22
+ transform: rotate(90deg);
23
+ }
24
+
25
+ &180 {
26
+ animation-name: spinanimation180;
27
+ animation-duration: 3000ms;
28
+ }
29
+
30
+ &45Anti {
31
+ animation-name: spinanimation;
32
+ animation-duration: 3000ms;
33
+ transform: rotate(-45deg);
34
+ }
35
+
36
+ &90Anti {
37
+ animation-name: spinanimation;
38
+ animation-duration: 3000ms;
39
+ transform: rotate(-90deg);
40
+ }
41
+
42
+ &180Anti {
43
+ animation-name: spinanimation;
44
+ animation-duration: 3000ms;
45
+ transform: rotate(-180deg);
46
+ }
47
+ }
@@ -1,4 +1,5 @@
1
1
  @import 'mixins.scss';
2
+ @import 'animations.scss';
2
3
 
3
4
  @import '../lib/ui/back-to-top/back-to-top.component';
4
5
  @import '../lib/ui/button-with-confirm-dialog/button-with-confirm-dialog.component';