@rlucan/ui 14.2.3 → 14.2.5

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.
@@ -17,7 +17,6 @@ export declare class ActionButtonComponent extends ButtonComponent implements On
17
17
  private leftPositions;
18
18
  openOverlay: boolean;
19
19
  onKeydownHandler(evt: KeyboardEvent): void;
20
- constructor();
21
20
  get positions(): {
22
21
  originX: string;
23
22
  originY: string;
@@ -8,6 +8,7 @@ export declare class DateComponent extends UiSimpleComponent {
8
8
  picker?: TemplateRef<any>;
9
9
  input?: TemplateRef<any>;
10
10
  onChange: any;
11
+ hasFocus: boolean;
11
12
  controlTypeName: string;
12
13
  opening: boolean;
13
14
  constructor(ngControl: NgControl);
@@ -13,11 +13,17 @@ export declare class FileComponent implements OnInit, OnChanges {
13
13
  src: string;
14
14
  mimeType?: string;
15
15
  };
16
+ get fitImageFileSize(): boolean;
16
17
  visible: boolean;
17
18
  src: any;
18
19
  srcUrlMimeType: any;
20
+ nativeFileSizeRatio: number;
21
+ nativeFileWidth: any;
22
+ nativeFileHeight: any;
19
23
  get width(): string;
24
+ get maxWidth(): string;
20
25
  get height(): string;
26
+ get maxHeight(): string;
21
27
  get isVideo(): any;
22
28
  get mime(): any;
23
29
  get useRetinaSrc(): boolean;
@@ -2,18 +2,29 @@ import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
2
  import { AbstractControl, ControlContainer, ValidationErrors } from '@angular/forms';
3
3
  import { UiSimpleComponent } from '../simple/ui-simple.component';
4
4
  import * as i0 from "@angular/core";
5
+ declare type PrefixSuffix = {
6
+ icon: string;
7
+ tooltip?: string;
8
+ };
5
9
  export declare class InputComponent extends UiSimpleComponent implements OnInit {
6
10
  protected controlContainer: ControlContainer;
7
- prefix: string;
8
- suffix: string;
11
+ prefixIcon: PrefixSuffix;
12
+ suffixIcon: PrefixSuffix;
9
13
  type: 'text' | 'number' | 'password';
10
14
  clearButton: boolean;
11
- disableUserInput: boolean;
15
+ activeIcons: boolean;
16
+ forceHasPrefix: boolean;
17
+ forceHasSuffix: boolean;
12
18
  centered: boolean;
13
19
  input: ElementRef | undefined;
20
+ prefix: ElementRef | undefined;
21
+ suffix: ElementRef | undefined;
14
22
  focusChanged: EventEmitter<boolean>;
15
23
  keyPressed: EventEmitter<KeyboardEvent>;
24
+ get hasPrefix(): boolean;
25
+ get hasSuffix(): boolean;
16
26
  required: boolean;
27
+ hasFocus: boolean;
17
28
  value: string;
18
29
  get maxLenRequired(): boolean;
19
30
  constructor(controlContainer: ControlContainer);
@@ -25,5 +36,6 @@ export declare class InputComponent extends UiSimpleComponent implements OnInit
25
36
  onKeypressed($event: any): void;
26
37
  validate(control: AbstractControl): ValidationErrors | null;
27
38
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, [{ optional: true; host: true; skipSelf: true; }]>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "ui-input", never, { "prefix": "prefix"; "suffix": "suffix"; "type": "type"; "clearButton": "clearButton"; "disableUserInput": "disableUserInput"; "centered": "centered"; }, { "focusChanged": "focusChanged"; "keyPressed": "keyPressed"; }, never, ["[slot=prefix]", "[slot=suffix]"], false, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "ui-input", never, { "prefixIcon": "prefixIcon"; "suffixIcon": "suffixIcon"; "type": "type"; "clearButton": "clearButton"; "activeIcons": "activeIcons"; "forceHasPrefix": "forceHasPrefix"; "forceHasSuffix": "forceHasSuffix"; "centered": "centered"; }, { "focusChanged": "focusChanged"; "keyPressed": "keyPressed"; }, never, ["[slot=prefix]", "[slot=suffix]"], false, never>;
29
40
  }
41
+ export {};
@@ -1,3 +1,4 @@
1
+ import { TemplateRef } from '@angular/core';
1
2
  import { DomSanitizer } from '@angular/platform-browser';
2
3
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
4
  import { Observable } from 'rxjs';
@@ -8,6 +9,8 @@ export interface MessageBoxButton {
8
9
  text: string;
9
10
  kind?: 'basic' | 'flat' | 'stroked';
10
11
  color?: 'primary' | 'accent' | 'warn';
12
+ process?: () => Promise<any>;
13
+ disabled?: () => boolean;
11
14
  }
12
15
  export declare class MessageBoxModalComponent {
13
16
  dialogRef: MatDialogRef<MessageBoxModalComponent>;
@@ -18,9 +21,12 @@ export declare class MessageBoxModalComponent {
18
21
  errorDetail: any;
19
22
  buttons: MessageBoxButton[];
20
23
  title: string;
24
+ template: any;
21
25
  hideCloseButton: boolean;
26
+ processing: MessageBoxButton;
22
27
  constructor(dialogRef: MatDialogRef<MessageBoxModalComponent>, sanitizer: DomSanitizer, data: any);
23
28
  close(result: any): void;
29
+ buttonClick(b: MessageBoxButton): void;
24
30
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxModalComponent, never>;
25
31
  static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxModalComponent, "ui-message-box-modal", never, {}, {}, never, never, false, never>;
26
32
  }
@@ -36,6 +42,16 @@ export declare class MessageBoxService {
36
42
  hideCloseButton?: boolean;
37
43
  maxWidth?: string;
38
44
  }): Observable<any>;
45
+ open(options?: {
46
+ buttons?: MessageBoxButton[];
47
+ title?: string;
48
+ errorMessage?: string;
49
+ errorDetail?: string;
50
+ hideCloseButton?: boolean;
51
+ maxWidth?: string;
52
+ message?: string;
53
+ template?: TemplateRef<any>;
54
+ }): Observable<any>;
39
55
  confirmDelete(title: string, message: string): Observable<any>;
40
56
  static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxService, never>;
41
57
  static ɵprov: i0.ɵɵInjectableDeclaration<MessageBoxService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlucan/ui",
3
- "version": "14.2.3",
3
+ "version": "14.2.5",
4
4
  "description": "My UI Components",
5
5
  "author": "rlucan@gmail.com",
6
6
  "peerDependencies": {
@@ -276,10 +276,25 @@
276
276
  placeholder: (
277
277
  color: rgba($baseTextColor, 0.60)
278
278
  ),
279
- prefix-suffix: (
280
- color: $primaryColor,
279
+ clear-icon: (
280
+ color: yellow,
281
281
  hover: (
282
- color: mat.get-color-from-palette($primaryPalette, 800),
282
+ color: pink
283
+ )
284
+ ),
285
+ prefix-suffix: (
286
+ color: mat.get-color-from-palette($primaryPalette, 100),
287
+ focus: (
288
+ color: $primaryColor
289
+ ),
290
+ active: (
291
+ color: $primaryColor,
292
+ hover: (
293
+ color: mat.get-color-from-palette($primaryPalette, 800),
294
+ ),
295
+ disabled: (
296
+ color: mat.get-color-from-palette(mat.$light-theme-foreground-palette, disabled-text)
297
+ )
283
298
  )
284
299
  ),
285
300
  ),
package/ui.scss CHANGED
@@ -126,10 +126,32 @@
126
126
 
127
127
  ui-input, ui-date {
128
128
  .control-container {
129
- [slot=suffix], [slot=prefix] {
130
- color: uiGetColor($colors, "input.prefix-suffix.color");
129
+ .xxxclear-icon {
130
+ color: uiGetColor($colors, "input.clear-icon.color");
131
131
  &:hover {
132
- color: uiGetColor($colors, "input.prefix-suffix.hover.color");
132
+ color: uiGetColor($colors, "input.clear-icon.hover.color");
133
+ }
134
+ }
135
+ }
136
+ .control-container.active-icons {
137
+ [slot=suffix], [slot=prefix], .prefix-icon, .suffix-icon {
138
+ color: uiGetColor($colors, "input.prefix-suffix.active.color");
139
+ &.disabled {
140
+ color: uiGetColor($colors, "input.prefix-suffix.active.disabled.color");
141
+ }
142
+ &:not(.disabled):hover {
143
+ color: uiGetColor($colors, "input.prefix-suffix.active.hover.color");
144
+ }
145
+ }
146
+ }
147
+
148
+ .control-container:not(.active-icons) {
149
+ [slot=suffix], [slot=prefix], .prefix-icon, .suffix-icon {
150
+ color: uiGetColor($colors, "input.prefix-suffix.color");
151
+ }
152
+ &.has-focus {
153
+ [slot=suffix], [slot=prefix], .prefix-icon, .suffix-icon {
154
+ color: uiGetColor($colors, "input.prefix-suffix.focus.color");
133
155
  }
134
156
  }
135
157
  }
@@ -392,7 +414,6 @@
392
414
  border-color: uiGetColor($colors, 'checkbox.primary.icon.color') !important;
393
415
  }
394
416
  }
395
- // TODO overit, zrejme nefunguje
396
417
  .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
397
418
  border-color: uiGetColor($colors, 'checkbox.primary.icon.checked-color') !important;
398
419
  }
@@ -411,8 +432,8 @@
411
432
  border-color: uiGetColor($colors, 'checkbox.accent.icon.color') !important;
412
433
  }
413
434
  }
414
- .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
415
- border-color: uiGetColor($colors, 'checkbox.accent.icon.color') !important;
435
+ .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
436
+ border-color: uiGetColor($colors, 'checkbox.accent.icon.checked-color') !important;
416
437
  }
417
438
  &.mat-mdc-checkbox-checked {
418
439
  label {
@@ -429,8 +450,8 @@
429
450
  border-color: uiGetColor($colors, 'checkbox.warn.icon.color') !important;
430
451
  }
431
452
  }
432
- .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
433
- border-color: uiGetColor($colors, 'checkbox.warn.icon.color') !important;
453
+ .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background {
454
+ border-color: uiGetColor($colors, 'checkbox.warn.icon.checked-color') !important;
434
455
  }
435
456
  &.mat-mdc-checkbox-checked {
436
457
  label {
@@ -740,7 +761,9 @@
740
761
  color: uiGetColor($colors, "select.option.color");
741
762
  }
742
763
  .mdc-list-item--selected {
743
- color: uiGetColor($colors, "select.option.selected.color");
764
+ .mdc-list-item__primary-text {
765
+ color: uiGetColor($colors, "select.option.selected.color");
766
+ }
744
767
  }
745
768
  }
746
769
 
@@ -806,6 +829,7 @@ ui-button, ui-action-button, ui-input, ui-date, ui-text-area, ui-select, ui-radi
806
829
  width: calc(2.5em / 2);
807
830
  height: calc(2.5em / 2);
808
831
  flex: 0 0 calc(2.5em / 2);
832
+ margin: calc(-1 * 2.5em / 4) !important;
809
833
  }
810
834
  .mdc-checkbox__background {
811
835
  height: calc(2.5em / 2);
@@ -889,9 +913,9 @@ ui-button, ui-action-button, ui-input, ui-date, ui-text-area, ui-select, ui-radi
889
913
  }
890
914
 
891
915
  .mat-mdc-checkbox {
892
- .mdc-checkbox {
893
- margin: -0.5em !important;
894
- }
916
+ //.mdc-checkbox {
917
+ // margin: -0.5em !important;
918
+ //}
895
919
  &.mat-mdc-checkbox-disabled {
896
920
  opacity: 0.38;
897
921
  //label {