@kms-ngx-ui/presentational 20.3.4 → 20.4.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/index.d.ts CHANGED
@@ -1,43 +1,43 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, EventEmitter, DoCheck, Renderer2, ElementRef, ApplicationRef, ChangeDetectorRef, NgZone, OnChanges, AfterViewInit, WritableSignal, Signal, SimpleChanges, TemplateRef, OnDestroy, PipeTransform, AfterContentChecked, InputSignal, Type } from '@angular/core';
3
- import * as i39 from '@angular/forms';
4
- import { ControlValueAccessor, UntypedFormGroup, NgControl, AbstractControl, UntypedFormControl, FormControl, FormArray, Validator, ValidationErrors, AsyncValidatorFn, ValidatorFn, FormGroup } from '@angular/forms';
5
- import * as i35 from '@angular/material/checkbox';
3
+ import * as i40 from '@angular/forms';
4
+ import { ControlValueAccessor, FormControl, UntypedFormGroup, NgControl, AbstractControl, UntypedFormControl, FormArray, Validator, ValidationErrors, AsyncValidatorFn, ValidatorFn, FormGroup } from '@angular/forms';
5
+ import * as i36 from '@angular/material/checkbox';
6
6
  import { MatCheckboxChange } from '@angular/material/checkbox';
7
7
  import { Subscription, Observable } from 'rxjs';
8
- import * as i38 from '@angular/material/dialog';
8
+ import * as i39 from '@angular/material/dialog';
9
9
  import { MatDialogRef } from '@angular/material/dialog';
10
- import * as i34 from '@angular/cdk/drag-drop';
10
+ import * as i35 from '@angular/cdk/drag-drop';
11
11
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
12
12
  import { SafeHtml, DomSanitizer, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
13
- import * as i50 from '@angular/material/slide-toggle';
13
+ import * as i51 from '@angular/material/slide-toggle';
14
14
  import { MatSlideToggleChange } from '@angular/material/slide-toggle';
15
15
  import { Placement } from '@floating-ui/dom';
16
- import * as i53 from '@angular-slider/ngx-slider';
16
+ import * as i54 from '@angular-slider/ngx-slider';
17
17
  import { Options, ChangeContext } from '@angular-slider/ngx-slider';
18
18
  export { ChangeContext as KmsSliderChange, Options as KmsSliderOptions } from '@angular-slider/ngx-slider';
19
19
  import * as _kms_ngx_ui_presentational from '@kms-ngx-ui/presentational';
20
- import * as i58 from '@angular/material/core';
20
+ import * as i59 from '@angular/material/core';
21
21
  import { ErrorStateMatcher } from '@angular/material/core';
22
22
  import * as i8 from '@angular/common';
23
23
  import { CurrencyPipe } from '@angular/common';
24
- import * as i36 from '@angular/material/button';
25
- import * as i37 from '@angular/material/radio';
26
- import * as i40 from '@angular/material/form-field';
27
- import * as i41 from '@angular/material/input';
28
- import * as i42 from '@angular/material/menu';
29
- import * as i44 from '@angular/google-maps';
30
- import * as i45 from '@angular/material/expansion';
31
- import * as i46 from '@angular/material/select';
32
- import * as i47 from 'ngx-mat-select-search';
33
- import * as i48 from '@angular/material/progress-spinner';
34
- import * as i51 from '@ngx-translate/core';
24
+ import * as i37 from '@angular/material/button';
25
+ import * as i38 from '@angular/material/radio';
26
+ import * as i41 from '@angular/material/form-field';
27
+ import * as i42 from '@angular/material/input';
28
+ import * as i43 from '@angular/material/menu';
29
+ import * as i45 from '@angular/google-maps';
30
+ import * as i46 from '@angular/material/expansion';
31
+ import * as i47 from '@angular/material/select';
32
+ import * as i48 from 'ngx-mat-select-search';
33
+ import * as i49 from '@angular/material/progress-spinner';
34
+ import * as i52 from '@ngx-translate/core';
35
35
  import { TranslateService } from '@ngx-translate/core';
36
- import * as i52 from '@angular/material/tooltip';
37
- import * as i54 from '@angular/material/autocomplete';
38
- import * as i55 from '@angular/material/list';
39
- import * as i56 from '@angular/material/card';
40
- import * as i57 from '@angular/material/datepicker';
36
+ import * as i53 from '@angular/material/tooltip';
37
+ import * as i55 from '@angular/material/autocomplete';
38
+ import * as i56 from '@angular/material/list';
39
+ import * as i57 from '@angular/material/card';
40
+ import * as i58 from '@angular/material/datepicker';
41
41
  import { MatDatepicker } from '@angular/material/datepicker';
42
42
  import * as icons from '@ui-presentational/assets/icons.json';
43
43
 
@@ -97,7 +97,8 @@ declare class BackToTopComponent {
97
97
 
98
98
  declare class CheckboxComponent implements ControlValueAccessor {
99
99
  infoText: string;
100
- checked: boolean;
100
+ set checked(value: boolean);
101
+ get checked(): boolean;
101
102
  disabled: boolean;
102
103
  /**
103
104
  * Internal description name. All checkboxes with the same name belong to the same group.
@@ -105,12 +106,14 @@ declare class CheckboxComponent implements ControlValueAccessor {
105
106
  */
106
107
  name: string;
107
108
  change: EventEmitter<any>;
109
+ innerControl: FormControl<boolean>;
108
110
  valueChanged(value: boolean): void;
109
111
  onChange: any;
110
112
  onTouched: any;
111
113
  writeValue(value: any): void;
112
114
  registerOnChange(fn: any): void;
113
115
  registerOnTouched(fn: any): void;
116
+ setDisabledState(isDisabled: boolean): void;
114
117
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxComponent, never>;
115
118
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "kms-checkbox", never, { "infoText": { "alias": "infoText"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, { "change": "change"; }, never, never, false, never>;
116
119
  }
@@ -387,6 +390,143 @@ declare class FileInputComponent implements ControlValueAccessor, OnInit {
387
390
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileInputComponent, "kms-file-input", never, { "label": { "alias": "label"; "required": false; }; "previewImage": { "alias": "previewImage"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "previewImageText": { "alias": "previewImageText"; "required": false; }; "maxSizeBytes": { "alias": "maxSizeBytes"; "required": false; }; "resizePixels": { "alias": "resizePixels"; "required": false; }; "acceptedFileMimetypes": { "alias": "acceptedFileMimetypes"; "required": false; }; }, { "formDataChanged": "formDataChanged"; }, never, never, false, never>;
388
391
  }
389
392
 
393
+ declare enum ButtonAppearance {
394
+ BASIC = "mat-button",
395
+ FLAT = "mat-flat-button",
396
+ RAISED = "mat-raised-button"
397
+ }
398
+
399
+ /** Translation config passed to kms-dropdown-from-data. */
400
+ interface SelectTranslation {
401
+ path: string;
402
+ isPrefix?: boolean;
403
+ useKeyAsValue?: boolean;
404
+ service: any;
405
+ }
406
+ /** Options for FieldType.SELECT and FieldType.MULTI_SELECT. */
407
+ interface SelectFieldOptions {
408
+ items?: LabelValuePair[] | Observable<LabelValuePair[]>;
409
+ plainItems?: string[];
410
+ enumItems?: any;
411
+ objItems?: {
412
+ data: any[];
413
+ mapKey: string;
414
+ mapValue?: string;
415
+ };
416
+ multiple?: boolean;
417
+ searchable?: boolean;
418
+ hasNullOption?: boolean;
419
+ selectAllText?: string;
420
+ disableOptions?: boolean;
421
+ useEnumIndexAsValue?: boolean;
422
+ preselectedKeys?: any;
423
+ translation?: SelectTranslation;
424
+ }
425
+ /** Options for FieldType.AUTOCOMPLETE. */
426
+ interface AutocompleteFieldOptions {
427
+ items: LabelValuePair[] | Observable<LabelValuePair[]>;
428
+ minChars?: number;
429
+ selectFirst?: boolean;
430
+ }
431
+ /** Options for FieldType.NUMBER — numeric text input. */
432
+ interface NumberFieldOptions {
433
+ min?: number;
434
+ max?: number;
435
+ }
436
+ /** Options for FieldType.COUNTER — passed to `kms-numeric-input`. */
437
+ interface CounterFieldOptions {
438
+ min?: number;
439
+ max?: number;
440
+ step?: number;
441
+ }
442
+ /** Options for FieldType.DATE and FieldType.MONTH_PICKER. */
443
+ interface DateFieldOptions {
444
+ min?: Date | string;
445
+ max?: Date | string;
446
+ }
447
+ /** Options for FieldType.DATE_RANGE. */
448
+ interface DateRangeFieldOptions {
449
+ min?: Date | string;
450
+ max?: Date | string;
451
+ startKey: string;
452
+ endKey: string;
453
+ }
454
+ /** Options for FieldType.TIME — passed to `kms-time-input`. */
455
+ interface TimeFieldOptions {
456
+ intervalMinutes?: number;
457
+ min?: string;
458
+ max?: string;
459
+ }
460
+ /** Options for FieldType.RADIO_GROUP — passed to `kms-radiogroup`. */
461
+ interface RadioGroupFieldOptions {
462
+ items: LabelValuePair[] | string[];
463
+ layout?: 'horizontal' | 'vertical';
464
+ size?: string;
465
+ }
466
+ /** Options for FieldType.TEXTAREA. */
467
+ interface TextareaFieldOptions {
468
+ rows?: number;
469
+ maxRows?: number;
470
+ autoResize?: boolean;
471
+ }
472
+ /** Options for FieldType.PASSWORD — passed to `kms-password`. */
473
+ interface PasswordFieldOptions {
474
+ withStrength?: boolean;
475
+ }
476
+ /** Position of the image preview relative to the upload button. */
477
+ type ImagePosition = 'top' | 'bottom' | 'left' | 'right';
478
+ /** Options for FieldType.IMAGE_UPLOAD — passed to `kms-image-upload`. */
479
+ interface ImageUploadFieldOptions {
480
+ buttonLabel?: string;
481
+ buttonIcon?: string;
482
+ removeLabel?: string;
483
+ removeIcon?: string;
484
+ accept?: string;
485
+ maxSizeBytes?: number;
486
+ resizePixels?: number;
487
+ imagePosition?: ImagePosition;
488
+ imageMaxHeight?: string;
489
+ }
490
+ /** Union of all type-specific option interfaces. Assign the one matching your FieldType. */
491
+ type FieldTypeOptions = SelectFieldOptions | AutocompleteFieldOptions | NumberFieldOptions | CounterFieldOptions | DateFieldOptions | DateRangeFieldOptions | TimeFieldOptions | RadioGroupFieldOptions | TextareaFieldOptions | PasswordFieldOptions | ImageUploadFieldOptions;
492
+
493
+ declare class ImageUploadComponent implements ControlValueAccessor {
494
+ private readonly cd;
495
+ fileInput: ElementRef<HTMLInputElement>;
496
+ label: string;
497
+ icon: string;
498
+ accept: string;
499
+ maxSizeBytes: number;
500
+ resizePixels: number;
501
+ imagePosition: ImagePosition;
502
+ imageMaxHeight: string;
503
+ removeLabel: string;
504
+ removeIcon: string;
505
+ disabled: boolean;
506
+ readonly ButtonAppearance: typeof ButtonAppearance;
507
+ readonly IconSizePx: typeof IconSizePx;
508
+ imageValue: AttachedFileDTO | null;
509
+ private onChange;
510
+ private onTouched;
511
+ constructor(cd: ChangeDetectorRef);
512
+ get hasImage(): boolean;
513
+ get imageSrc(): string;
514
+ get layoutClass(): string;
515
+ get actionsClass(): string;
516
+ openFileDialog(): void;
517
+ onFileSelected(event: Event): void;
518
+ removeImage(): void;
519
+ writeValue(value: AttachedFileDTO | null): void;
520
+ registerOnChange(fn: (value: AttachedFileDTO | null) => void): void;
521
+ registerOnTouched(fn: () => void): void;
522
+ setDisabledState(isDisabled: boolean): void;
523
+ private setValue;
524
+ private clearInput;
525
+ private resizeImage;
526
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ImageUploadComponent, never>;
527
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ImageUploadComponent, "kms-image-upload", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "accept": { "alias": "accept"; "required": false; }; "maxSizeBytes": { "alias": "maxSizeBytes"; "required": false; }; "resizePixels": { "alias": "resizePixels"; "required": false; }; "imagePosition": { "alias": "imagePosition"; "required": false; }; "imageMaxHeight": { "alias": "imageMaxHeight"; "required": false; }; "removeLabel": { "alias": "removeLabel"; "required": false; }; "removeIcon": { "alias": "removeIcon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
528
+ }
529
+
390
530
  declare class FlyoutComponent {
391
531
  icon: string;
392
532
  isDropdownOpened: boolean;
@@ -843,12 +983,6 @@ declare class CardComponent {
843
983
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CardComponent, "kms-card", never, { "imageUrl": { "alias": "imageUrl"; "required": false; "isSignal": true; }; "hoverEffect": { "alias": "hoverEffect"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
844
984
  }
845
985
 
846
- declare enum ButtonAppearance {
847
- BASIC = "mat-button",
848
- FLAT = "mat-flat-button",
849
- RAISED = "mat-raised-button"
850
- }
851
-
852
986
  declare class ButtonComponent {
853
987
  color: _angular_core.InputSignal<StylingTheme>;
854
988
  type: _angular_core.InputSignal<"button" | "submit" | "reset">;
@@ -944,88 +1078,9 @@ declare enum FieldType {
944
1078
  COUNTER = "counter",
945
1079
  MONTH_PICKER = "monthPicker",
946
1080
  TEMPLATE = "template",
947
- OFFSET = "offset"
948
- }
949
-
950
- /** Translation config passed to kms-dropdown-from-data. */
951
- interface SelectTranslation {
952
- path: string;
953
- isPrefix?: boolean;
954
- useKeyAsValue?: boolean;
955
- service: any;
956
- }
957
- /** Options for FieldType.SELECT and FieldType.MULTI_SELECT. */
958
- interface SelectFieldOptions {
959
- items?: LabelValuePair[] | Observable<LabelValuePair[]>;
960
- plainItems?: string[];
961
- enumItems?: any;
962
- objItems?: {
963
- data: any[];
964
- mapKey: string;
965
- mapValue?: string;
966
- };
967
- multiple?: boolean;
968
- searchable?: boolean;
969
- hasNullOption?: boolean;
970
- selectAllText?: string;
971
- disableOptions?: boolean;
972
- useEnumIndexAsValue?: boolean;
973
- preselectedKeys?: any;
974
- translation?: SelectTranslation;
975
- }
976
- /** Options for FieldType.AUTOCOMPLETE. */
977
- interface AutocompleteFieldOptions {
978
- items: LabelValuePair[] | Observable<LabelValuePair[]>;
979
- minChars?: number;
980
- selectFirst?: boolean;
1081
+ OFFSET = "offset",
1082
+ IMAGE_UPLOAD = "imageUpload"
981
1083
  }
982
- /** Options for FieldType.NUMBER — numeric text input. */
983
- interface NumberFieldOptions {
984
- min?: number;
985
- max?: number;
986
- }
987
- /** Options for FieldType.COUNTER — passed to `kms-numeric-input`. */
988
- interface CounterFieldOptions {
989
- min?: number;
990
- max?: number;
991
- step?: number;
992
- }
993
- /** Options for FieldType.DATE and FieldType.MONTH_PICKER. */
994
- interface DateFieldOptions {
995
- min?: Date | string;
996
- max?: Date | string;
997
- }
998
- /** Options for FieldType.DATE_RANGE. */
999
- interface DateRangeFieldOptions {
1000
- min?: Date | string;
1001
- max?: Date | string;
1002
- startKey: string;
1003
- endKey: string;
1004
- }
1005
- /** Options for FieldType.TIME — passed to `kms-time-input`. */
1006
- interface TimeFieldOptions {
1007
- intervalMinutes?: number;
1008
- min?: string;
1009
- max?: string;
1010
- }
1011
- /** Options for FieldType.RADIO_GROUP — passed to `kms-radiogroup`. */
1012
- interface RadioGroupFieldOptions {
1013
- items: LabelValuePair[] | string[];
1014
- layout?: 'horizontal' | 'vertical';
1015
- size?: string;
1016
- }
1017
- /** Options for FieldType.TEXTAREA. */
1018
- interface TextareaFieldOptions {
1019
- rows?: number;
1020
- maxRows?: number;
1021
- autoResize?: boolean;
1022
- }
1023
- /** Options for FieldType.PASSWORD — passed to `kms-password`. */
1024
- interface PasswordFieldOptions {
1025
- withStrength?: boolean;
1026
- }
1027
- /** Union of all type-specific option interfaces. Assign the one matching your FieldType. */
1028
- type FieldTypeOptions = SelectFieldOptions | AutocompleteFieldOptions | NumberFieldOptions | CounterFieldOptions | DateFieldOptions | DateRangeFieldOptions | TimeFieldOptions | RadioGroupFieldOptions | TextareaFieldOptions | PasswordFieldOptions;
1029
1084
 
1030
1085
  /** Form layout mode. Currently only GRID is implemented. */
1031
1086
  declare enum FormLayout {
@@ -1243,6 +1298,7 @@ declare class DynamicFieldDirective implements OnDestroy {
1243
1298
  private mapSelectBehaviour;
1244
1299
  private mapPrefixSuffix;
1245
1300
  private mapPassword;
1301
+ private mapImageUpload;
1246
1302
  private mapCounter;
1247
1303
  private trySetInput;
1248
1304
  private teardown;
@@ -1276,6 +1332,7 @@ declare class TextInputComponent implements ControlValueAccessor {
1276
1332
  readonly hintId: string;
1277
1333
  readonly errorId: string;
1278
1334
  errorStateMatcher: ErrorStateMatcher;
1335
+ private readonly cd;
1279
1336
  onChange: (value?: string) => void;
1280
1337
  onTouched: () => void;
1281
1338
  valueChanged(event: Event): void;
@@ -1604,7 +1661,7 @@ declare class DateInputComponent implements ControlValueAccessor {
1604
1661
 
1605
1662
  declare class KmsUiPresentationalModule {
1606
1663
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KmsUiPresentationalModule, never>;
1607
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KmsUiPresentationalModule, [typeof BackToTopComponent, typeof CheckboxComponent, typeof ColorInputComponent, typeof DropdownFromDataComponent, typeof EnumRadiogroupComponent, typeof FileInputComponent, typeof FlyoutComponent, typeof ConfirmationDialogComponent, typeof ImageSliderComponent, typeof KMSAccordionItemComponent, typeof KmsUiPresentationalComponent, typeof LoaderComponent, typeof MapComponent, typeof RadioButtonComponent, typeof RadioGroupComponent, typeof SalutationDropdownComponent, typeof SalutationRadiogroupComponent, typeof SlideToggleComponent, typeof TimeInputComponent, typeof TooltipIconComponent, typeof YesNoRadiogroupComponent, typeof PasswordComponent, typeof SliderComponent, typeof CardComponent, typeof ButtonComponent, typeof NumericInputComponent, typeof GenericFormComponent, typeof FormSectionComponent, typeof FormFieldComponent, typeof FormActionsComponent, typeof DynamicFieldDirective, typeof TextInputComponent], [typeof i8.CommonModule, typeof i34.DragDropModule, typeof i35.MatCheckboxModule, typeof i36.MatButtonModule, typeof i37.MatRadioModule, typeof i38.MatDialogModule, typeof i39.FormsModule, typeof i39.ReactiveFormsModule, typeof i40.MatFormFieldModule, typeof i41.MatInputModule, typeof i42.MatMenuModule, typeof CustomPipesModule, typeof i44.GoogleMapsModule, typeof i45.MatExpansionModule, typeof i46.MatSelectModule, typeof i47.NgxMatSelectSearchModule, typeof i48.MatProgressSpinnerModule, typeof DirectivesModule, typeof i50.MatSlideToggleModule, typeof i51.TranslateModule, typeof i52.MatTooltipModule, typeof i53.NgxSliderModule, typeof i54.MatAutocompleteModule, typeof i55.MatListModule, typeof i56.MatCardModule, typeof i57.MatDatepickerModule, typeof i58.MatNativeDateModule, typeof IconComponent, typeof InlineAlertComponent, typeof DateInputComponent], [typeof BackToTopComponent, typeof CheckboxComponent, typeof ColorInputComponent, typeof DropdownFromDataComponent, typeof EnumRadiogroupComponent, typeof RadioGroupComponent, typeof FileInputComponent, typeof FlyoutComponent, typeof ConfirmationDialogComponent, typeof IconComponent, typeof ImageSliderComponent, typeof InlineAlertComponent, typeof KMSAccordionItemComponent, typeof KmsUiPresentationalComponent, typeof LoaderComponent, typeof MapComponent, typeof RadioButtonComponent, typeof SalutationDropdownComponent, typeof SalutationRadiogroupComponent, typeof SlideToggleComponent, typeof TimeInputComponent, typeof TooltipIconComponent, typeof YesNoRadiogroupComponent, typeof PasswordComponent, typeof SliderComponent, typeof CardComponent, typeof ButtonComponent, typeof NumericInputComponent, typeof GenericFormComponent, typeof FormSectionComponent, typeof FormActionsComponent, typeof DynamicFieldDirective, typeof DateInputComponent, typeof TextInputComponent]>;
1664
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KmsUiPresentationalModule, [typeof BackToTopComponent, typeof CheckboxComponent, typeof ColorInputComponent, typeof DropdownFromDataComponent, typeof EnumRadiogroupComponent, typeof FileInputComponent, typeof ImageUploadComponent, typeof FlyoutComponent, typeof ConfirmationDialogComponent, typeof ImageSliderComponent, typeof KMSAccordionItemComponent, typeof KmsUiPresentationalComponent, typeof LoaderComponent, typeof MapComponent, typeof RadioButtonComponent, typeof RadioGroupComponent, typeof SalutationDropdownComponent, typeof SalutationRadiogroupComponent, typeof SlideToggleComponent, typeof TimeInputComponent, typeof TooltipIconComponent, typeof YesNoRadiogroupComponent, typeof PasswordComponent, typeof SliderComponent, typeof CardComponent, typeof ButtonComponent, typeof NumericInputComponent, typeof GenericFormComponent, typeof FormSectionComponent, typeof FormFieldComponent, typeof FormActionsComponent, typeof DynamicFieldDirective, typeof TextInputComponent], [typeof i8.CommonModule, typeof i35.DragDropModule, typeof i36.MatCheckboxModule, typeof i37.MatButtonModule, typeof i38.MatRadioModule, typeof i39.MatDialogModule, typeof i40.FormsModule, typeof i40.ReactiveFormsModule, typeof i41.MatFormFieldModule, typeof i42.MatInputModule, typeof i43.MatMenuModule, typeof CustomPipesModule, typeof i45.GoogleMapsModule, typeof i46.MatExpansionModule, typeof i47.MatSelectModule, typeof i48.NgxMatSelectSearchModule, typeof i49.MatProgressSpinnerModule, typeof DirectivesModule, typeof i51.MatSlideToggleModule, typeof i52.TranslateModule, typeof i53.MatTooltipModule, typeof i54.NgxSliderModule, typeof i55.MatAutocompleteModule, typeof i56.MatListModule, typeof i57.MatCardModule, typeof i58.MatDatepickerModule, typeof i59.MatNativeDateModule, typeof IconComponent, typeof InlineAlertComponent, typeof DateInputComponent], [typeof BackToTopComponent, typeof CheckboxComponent, typeof ColorInputComponent, typeof DropdownFromDataComponent, typeof EnumRadiogroupComponent, typeof RadioGroupComponent, typeof FileInputComponent, typeof ImageUploadComponent, typeof FlyoutComponent, typeof ConfirmationDialogComponent, typeof IconComponent, typeof ImageSliderComponent, typeof InlineAlertComponent, typeof KMSAccordionItemComponent, typeof KmsUiPresentationalComponent, typeof LoaderComponent, typeof MapComponent, typeof RadioButtonComponent, typeof SalutationDropdownComponent, typeof SalutationRadiogroupComponent, typeof SlideToggleComponent, typeof TimeInputComponent, typeof TooltipIconComponent, typeof YesNoRadiogroupComponent, typeof PasswordComponent, typeof SliderComponent, typeof CardComponent, typeof ButtonComponent, typeof NumericInputComponent, typeof GenericFormComponent, typeof FormSectionComponent, typeof FormActionsComponent, typeof DynamicFieldDirective, typeof DateInputComponent, typeof TextInputComponent]>;
1608
1665
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<KmsUiPresentationalModule>;
1609
1666
  }
1610
1667
 
@@ -1791,7 +1848,7 @@ declare class GenericFormModule {
1791
1848
  constructor(translate: TranslateService);
1792
1849
  private mergeMessages;
1793
1850
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<GenericFormModule, never>;
1794
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<GenericFormModule, never, [typeof i51.TranslateModule], never>;
1851
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<GenericFormModule, never, [typeof i52.TranslateModule], never>;
1795
1852
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<GenericFormModule>;
1796
1853
  }
1797
1854
 
@@ -1842,5 +1899,5 @@ declare class FieldRegistryService {
1842
1899
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<FieldRegistryService>;
1843
1900
  }
1844
1901
 
1845
- export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet$1 as ImageSnippet, ImageSourceType$1 as ImageSourceType, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
1846
- export type { AsyncValidatorConfig, AutocompleteFieldOptions, CounterFieldOptions, DateFieldOptions, DateRangeFieldOptions, DateRangeValue, DialogConfig, DialogData, DisabledConfig, ErrorDisplayConfig, ErrorDisplayStrategy, FieldAffixConfig, FieldConfig, FieldTypeOptions, FormActionsConfig, FormSectionConfig, GenericFormConfig, GenericFormState, GridAlign, GridVerticalAlign, InlineAlertType, NullAble, NumberFieldOptions, PasswordFieldOptions, RadioGroupFieldOptions, RadiobuttonInterface, SelectFieldOptions, SelectTranslation, TextareaFieldOptions, TimeFieldOptions, ValidatorConfig };
1902
+ export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet$1 as ImageSnippet, ImageSourceType$1 as ImageSourceType, ImageUploadComponent, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
1903
+ export type { AsyncValidatorConfig, AutocompleteFieldOptions, CounterFieldOptions, DateFieldOptions, DateRangeFieldOptions, DateRangeValue, DialogConfig, DialogData, DisabledConfig, ErrorDisplayConfig, ErrorDisplayStrategy, FieldAffixConfig, FieldConfig, FieldTypeOptions, FormActionsConfig, FormSectionConfig, GenericFormConfig, GenericFormState, GridAlign, GridVerticalAlign, ImagePosition, ImageUploadFieldOptions, InlineAlertType, NullAble, NumberFieldOptions, PasswordFieldOptions, RadioGroupFieldOptions, RadiobuttonInterface, SelectFieldOptions, SelectTranslation, TextareaFieldOptions, TimeFieldOptions, ValidatorConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kms-ngx-ui/presentational",
3
- "version": "20.3.4",
3
+ "version": "20.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^20.2.14",
6
6
  "@angular/common": "^20.3.15",
@@ -28,7 +28,7 @@ import { ComponentName } from '@kms-ngx-ui/presentational';
28
28
  **Inputs:**
29
29
  | Name | Type | Default | Description |
30
30
  |------|------|---------|-------------|
31
- | `checked` | `boolean` | `false` | |
31
+ | `checked` | `boolean` | `-` | |
32
32
  | `disabled` | `boolean` | `false` | |
33
33
  | `infoText` | `string` | `''` | |
34
34
  | `name` | `string` | `''` | Internal description name. All checkboxes with the same name belong to the same group. User can select none, one or all checkboxes with the same name. |
@@ -278,6 +278,22 @@ A confirmation dialog component
278
278
  | `deleteImageEvent` | `EventEmitter<number>` |
279
279
  | `orderChanged` | `EventEmitter<ImageSnippet[]>` |
280
280
 
281
+ ### `<kms-image-upload>` — ImageUploadComponent
282
+
283
+ **Inputs:**
284
+ | Name | Type | Default | Description |
285
+ |------|------|---------|-------------|
286
+ | `accept` | `string` | `'image/jpeg, image/jpg, image/png'` | |
287
+ | `disabled` | `boolean` | `false` | |
288
+ | `icon` | `string` | `'ic_edit'` | |
289
+ | `imageMaxHeight` | `string` | `'128px'` | |
290
+ | `imagePosition` | `ImagePosition` | `'top'` | |
291
+ | `label` | `string` | `'Upload'` | |
292
+ | `maxSizeBytes` | `number` | `DEFAULT_MAX_SIZE_BYTES` | |
293
+ | `removeIcon` | `string` | `'trash'` | |
294
+ | `removeLabel` | `string` | `''` | |
295
+ | `resizePixels` | `number` | `0` | |
296
+
281
297
  ### `<kms-inline-alert>` — InlineAlertComponent
282
298
 
283
299
  **Inputs:**
@@ -608,6 +624,7 @@ Usage: `value | kmsTypeOf`
608
624
  - `MONTH_PICKER` = `monthPicker`
609
625
  - `TEMPLATE` = `template`
610
626
  - `OFFSET` = `offset`
627
+ - `IMAGE_UPLOAD` = `imageUpload`
611
628
 
612
629
  ### FormLayout
613
630
  - `VERTICAL` = `vertical`
@@ -813,6 +830,17 @@ Usage: `value | kmsTypeOf`
813
830
  - `untouched`: `boolean`
814
831
  - `valid`: `boolean`
815
832
 
833
+ ### ImageUploadFieldOptions
834
+ - `accept`: `string` (optional)
835
+ - `buttonIcon`: `string` (optional)
836
+ - `buttonLabel`: `string` (optional)
837
+ - `imageMaxHeight`: `string` (optional)
838
+ - `imagePosition`: `ImagePosition` (optional)
839
+ - `maxSizeBytes`: `number` (optional)
840
+ - `removeIcon`: `string` (optional)
841
+ - `removeLabel`: `string` (optional)
842
+ - `resizePixels`: `number` (optional)
843
+
816
844
  ### ITranslation
817
845
  - `isPrefix`: `boolean` (optional)
818
846
  - `path`: `string`
@@ -0,0 +1,106 @@
1
+ @mixin image-upload-theme() {
2
+ .kms-image-upload {
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: flex-start;
6
+ gap: 12px;
7
+
8
+ &--top {
9
+ flex-direction: column;
10
+ align-items: center;
11
+ }
12
+
13
+ &--bottom {
14
+ flex-direction: column-reverse;
15
+ align-items: center;
16
+ }
17
+
18
+ &--left {
19
+ flex-direction: row;
20
+ align-items: center;
21
+ }
22
+
23
+ &--right {
24
+ flex-direction: row-reverse;
25
+ align-items: center;
26
+ }
27
+
28
+ &__image {
29
+ display: block;
30
+ max-width: 100%;
31
+ object-fit: contain;
32
+ border-radius: 4px;
33
+ border: 1px solid var(--kms-tertiary-20, #e0e0e0);
34
+ }
35
+
36
+ &__actions {
37
+ display: flex;
38
+ gap: 4px;
39
+
40
+ &--horizontal {
41
+ flex-direction: row;
42
+ align-items: center;
43
+ }
44
+
45
+ &--vertical {
46
+ flex-direction: column;
47
+ align-items: flex-start;
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ // Apply styles directly for component encapsulation
54
+ :host {
55
+ display: block;
56
+ }
57
+
58
+ .kms-image-upload {
59
+ display: flex;
60
+ flex-direction: row;
61
+ align-items: flex-start;
62
+ gap: 12px;
63
+
64
+ &--top {
65
+ flex-direction: column;
66
+ align-items: center;
67
+ }
68
+
69
+ &--bottom {
70
+ flex-direction: column-reverse;
71
+ align-items: center;
72
+ }
73
+
74
+ &--left {
75
+ flex-direction: row;
76
+ align-items: center;
77
+ }
78
+
79
+ &--right {
80
+ flex-direction: row-reverse;
81
+ align-items: center;
82
+ }
83
+
84
+ &__image {
85
+ display: block;
86
+ max-width: 100%;
87
+ object-fit: contain;
88
+ border-radius: 4px;
89
+ border: 1px solid var(--kms-tertiary-20, #e0e0e0);
90
+ }
91
+
92
+ &__actions {
93
+ display: flex;
94
+ gap: 4px;
95
+
96
+ &--horizontal {
97
+ flex-direction: row;
98
+ align-items: center;
99
+ }
100
+
101
+ &--vertical {
102
+ flex-direction: column;
103
+ align-items: flex-start;
104
+ }
105
+ }
106
+ }