@kms-ngx-ui/presentational 0.0.23 → 0.0.24

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 (37) hide show
  1. package/bundles/kms-ngx-ui-presentational.umd.js +257 -134
  2. package/bundles/kms-ngx-ui-presentational.umd.js.map +1 -1
  3. package/esm2015/lib/directives/directives.module.js +8 -3
  4. package/esm2015/lib/directives/size.directive.js +21 -0
  5. package/esm2015/lib/parent-components/colorable.component.js +35 -0
  6. package/esm2015/lib/parent-components/form-control.component.js +4 -3
  7. package/esm2015/lib/parent-components/form.component.js +36 -15
  8. package/esm2015/lib/services/viewport.service.js +66 -40
  9. package/esm2015/lib/ui/back-to-top/back-to-top.component.js +1 -1
  10. package/esm2015/lib/ui/file-input/file-input.component.js +6 -6
  11. package/esm2015/lib/ui/flyout/flyout.component.js +5 -4
  12. package/esm2015/lib/ui/icon/icon.component.js +5 -2
  13. package/esm2015/lib/ui/icon/iconSize.enum.js +12 -1
  14. package/esm2015/lib/ui/image-slider/image-slider.component.js +1 -1
  15. package/esm2015/lib/ui/kms-accordion-item/kms-accordion-item.component.js +1 -1
  16. package/esm2015/lib/ui/map/map.component.js +2 -2
  17. package/esm2015/lib/ui/radiobutton/radiobutton.component.js +7 -3
  18. package/esm2015/lib/ui/tooltip-icon/tooltip-icon.component.js +5 -4
  19. package/esm2015/public-api.js +2 -1
  20. package/fesm2015/kms-ngx-ui-presentational.js +242 -123
  21. package/fesm2015/kms-ngx-ui-presentational.js.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/parent-components/colorable.component.d.ts +10 -0
  25. package/lib/parent-components/form.component.d.ts +11 -5
  26. package/lib/services/viewport.service.d.ts +13 -4
  27. package/lib/ui/file-input/file-input.component.d.ts +2 -2
  28. package/lib/ui/icon/icon.component.d.ts +7 -1
  29. package/lib/ui/icon/iconSize.enum.d.ts +10 -0
  30. package/lib/ui/radiobutton/radiobutton.component.d.ts +2 -1
  31. package/lib/ui/tooltip-icon/tooltip-icon.component.d.ts +2 -2
  32. package/package.json +1 -1
  33. package/public-api.d.ts +1 -0
  34. package/src/lib/ui/back-to-top/back-to-top.component.scss +2 -3
  35. package/src/lib/ui/icon/icon.component.scss +2 -36
  36. package/src/styles/animations.scss +47 -0
  37. 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>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ColorableParentComponent {
3
+ /**
4
+ * Defines the color property
5
+ */
6
+ color?: string;
7
+ setupColors(elementRef: HTMLElement): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorableParentComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColorableParentComponent, "ng-component", never, { "color": "color"; }, {}, never, never>;
10
+ }
@@ -1,23 +1,27 @@
1
1
  /*!
2
2
  * @copyright FLYACTS GmbH 2019
3
3
  */
4
- import { EventEmitter, OnInit } from '@angular/core';
4
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
5
5
  import { FormBuilder, FormGroup } from '@angular/forms';
6
+ import { SubSink } from 'subsink';
7
+ import { ColorableParentComponent } from './colorable.component';
6
8
  import * as i0 from "@angular/core";
7
- export declare class FormParentComponent implements OnInit {
9
+ export declare class FormParentComponent extends ColorableParentComponent implements OnInit, OnDestroy {
8
10
  formBuilder: FormBuilder;
11
+ disabled: boolean;
12
+ showRequired: boolean;
9
13
  form: FormGroup;
10
14
  formInitialized: boolean;
11
15
  private allowedCharsOnlyNumbers;
16
+ subs: SubSink;
12
17
  formDataChanged: EventEmitter<FormGroup>;
13
- disabled: boolean;
14
18
  constructor(formBuilder: FormBuilder);
15
19
  /**
16
20
  * Returns if a number was pressed
17
21
  * @param e
18
22
  * @returns
19
23
  */
20
- checkIfKeyWasNumber(e: KeyboardEvent, allowDelete?: boolean, allowArrows?: boolean, allowCutCopyPaste?: boolean): boolean;
24
+ checkIfKeyWasNumber(e: KeyboardEvent, allowDelete?: boolean, allowArrows?: boolean, allowCutCopyPaste?: boolean): boolean | 9;
21
25
  /**
22
26
  * Prevents to input other chars than numbers in input
23
27
  * @param event
@@ -29,6 +33,8 @@ export declare class FormParentComponent implements OnInit {
29
33
  */
30
34
  removeNumbersOnPaste(event: ClipboardEvent): void;
31
35
  ngOnInit(): void;
36
+ ngOnDestroy(): void;
37
+ initFormEvent(): void;
32
38
  static ɵfac: i0.ɵɵFactoryDeclaration<FormParentComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<FormParentComponent, "kms-form", never, { "disabled": "disabled"; }, { "formDataChanged": "formDataChanged"; }, never, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormParentComponent, "kms-form", never, { "disabled": "disabled"; "showRequired": "showRequired"; }, { "formDataChanged": "formDataChanged"; }, never, never>;
34
40
  }
@@ -6,6 +6,7 @@ import * as i0 from "@angular/core";
6
6
  */
7
7
  export declare class ViewportService implements OnDestroy {
8
8
  private platformId;
9
+ document: Document;
9
10
  readonly viewports: {
10
11
  name: string;
11
12
  low: number;
@@ -14,7 +15,8 @@ export declare class ViewportService implements OnDestroy {
14
15
  private viewportChangedSubscriber;
15
16
  private viewportResizedSubscriber;
16
17
  private currentViewport;
17
- constructor(platformId: Object);
18
+ private isBrowser;
19
+ constructor(platformId: Object, document: Document);
18
20
  /**
19
21
  * Get window height
20
22
  */
@@ -36,6 +38,11 @@ export declare class ViewportService implements OnDestroy {
36
38
  * @returns string
37
39
  */
38
40
  getCurrentViewPort(): string;
41
+ /**
42
+ * Returns the current viewport MQ as string
43
+ * @returns string
44
+ */
45
+ getCurrentViewPortNumber(): number;
39
46
  /**
40
47
  * Provides mq´s as string
41
48
  */
@@ -56,7 +63,10 @@ export declare class ViewportService implements OnDestroy {
56
63
  * @param top - top position value
57
64
  */
58
65
  scrollTop(top: number): void;
59
- ngOnDestroy(): void;
66
+ isPortrait(): boolean;
67
+ isLandscape(): boolean;
68
+ isMobile(): boolean;
69
+ calculateFullscreenElementsheight(id: string, defaultheight: string, extra: number): string;
60
70
  /**
61
71
  * If viewport changed
62
72
  * @event
@@ -67,8 +77,7 @@ export declare class ViewportService implements OnDestroy {
67
77
  * @param width Width to get the according MQ for
68
78
  */
69
79
  private convertWidthToMediaQuery;
70
- isPortrait(): boolean;
71
- isLandscape(): boolean;
80
+ ngOnDestroy(): void;
72
81
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
73
82
  static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
74
83
  }
@@ -1,8 +1,8 @@
1
1
  import { OnInit, Renderer2, EventEmitter, ApplicationRef, ChangeDetectorRef } from '@angular/core';
2
2
  import { ControlValueAccessor, FormBuilder, FormControl, FormGroup } 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: FormBuilder;
@@ -20,7 +20,7 @@ export declare class FileInputComponent implements ControlValueAccessor, OnInit
20
20
  form: FormGroup;
21
21
  subscriptions: Subscription[];
22
22
  newImageLoading: boolean;
23
- IconSize: typeof IconSize;
23
+ IconSizePx: typeof IconSizePx;
24
24
  formDataChanged: EventEmitter<FormGroup>;
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>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<IconComponent, "kms-icon", never, { "icon": "icon"; "iconClass": "iconClass"; "iconStyle": "iconStyle"; "iconSize": "iconSize"; "size": "size"; "dontUseSprite": "dontUseSprite"; }, {}, never, never>;
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, ["*"]>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "kms-radiobutton", never, { "name": "name"; "id": "id"; "radioButtonSize": "radioButtonSize"; "formControl": "formControl"; }, {}, never, ["*"]>;
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>;
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kms-ngx-ui/presentational",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "12.2.13",
6
6
  "@angular/common": "12.2.16",
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';