cps-ui-kit 0.5.0 → 0.7.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.
@@ -1,9 +1,9 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { iconSizeType } from '../cps-icon/cps-icon.component';
4
4
  import { LabelByValuePipe } from '../../pipes/label-by-value.pipe';
5
5
  import * as i0 from "@angular/core";
6
- export declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {
6
+ export declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit, OnDestroy {
7
7
  private _control;
8
8
  private _labelByValue;
9
9
  label: string;
@@ -42,7 +42,6 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
42
42
  activeSingle: boolean;
43
43
  optionHighlightedIndex: number;
44
44
  constructor(_control: NgControl, _labelByValue: LabelByValuePipe);
45
- ngOnChanges(changes: SimpleChanges): void;
46
45
  ngOnInit(): void;
47
46
  ngOnDestroy(): void;
48
47
  private _toggleOptions;
@@ -56,7 +55,6 @@ export declare class CpsAutocompleteComponent implements ControlValueAccessor, O
56
55
  registerOnChange(fn: any): void;
57
56
  registerOnTouched(fn: any): void;
58
57
  filterOptions(event: any): void;
59
- private _convertValue;
60
58
  writeValue(value: any): void;
61
59
  private updateValue;
62
60
  private _getValueLabel;
@@ -0,0 +1,52 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
5
+ private _control;
6
+ label: string;
7
+ disabled: boolean;
8
+ width: number | string;
9
+ placeholder: string;
10
+ hint: string;
11
+ clearable: boolean;
12
+ hideDetails: boolean;
13
+ persistentClear: boolean;
14
+ showTodayButton: boolean;
15
+ openOnInputFocus: boolean;
16
+ minDate: Date;
17
+ maxDate: Date;
18
+ set value(value: Date | null);
19
+ get value(): Date | null;
20
+ valueChanged: EventEmitter<Date | null>;
21
+ stringDate: string;
22
+ isOpened: boolean;
23
+ topPos: string;
24
+ error: string;
25
+ cvtWidth: string;
26
+ private _statusChangesSubscription;
27
+ private _value;
28
+ constructor(_control: NgControl);
29
+ ngOnInit(): void;
30
+ ngOnDestroy(): void;
31
+ onChange: (event: any) => void;
32
+ onTouched: () => void;
33
+ registerOnChange(fn: any): void;
34
+ registerOnTouched(fn: any): void;
35
+ onInputValueChanged(val: string): void;
36
+ writeValue(value: Date | null): void;
37
+ private _updateValue;
38
+ private _updateValueFromInputString;
39
+ private _checkDateFormat;
40
+ private _checkDateInRange;
41
+ private _dateToString;
42
+ private _stringToDate;
43
+ private _checkErrors;
44
+ onSelectCalendarDate(dateVal: Date): void;
45
+ onInputBlur(): void;
46
+ onClickCalendarIcon(): void;
47
+ onClickOutside(): void;
48
+ onInputFocus(): void;
49
+ toggleCalendar(show?: boolean): void;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<CpsDatepickerComponent, [{ optional: true; self: true; }]>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsDatepickerComponent, "cps-datepicker", never, { "label": "label"; "disabled": "disabled"; "width": "width"; "placeholder": "placeholder"; "hint": "hint"; "clearable": "clearable"; "hideDetails": "hideDetails"; "persistentClear": "persistentClear"; "showTodayButton": "showTodayButton"; "openOnInputFocus": "openOnInputFocus"; "minDate": "minDate"; "maxDate": "maxDate"; "value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
52
+ }
@@ -15,20 +15,24 @@ export declare class CpsInputComponent implements ControlValueAccessor, OnInit,
15
15
  loading: boolean;
16
16
  clearable: boolean;
17
17
  prefixIcon: string;
18
+ prefixIconClickable: boolean;
18
19
  prefixIconSize: iconSizeType;
19
20
  prefixText: string;
20
21
  hideDetails: boolean;
21
22
  persistentClear: boolean;
23
+ error: string;
22
24
  set value(value: string);
23
25
  get value(): string;
24
26
  valueChanged: EventEmitter<string>;
27
+ focused: EventEmitter<any>;
28
+ prefixIconClicked: EventEmitter<any>;
29
+ blurred: EventEmitter<any>;
25
30
  prefixTextSpan: ElementRef | undefined;
26
- private _statusChangesSubscription;
27
- private _value;
28
- error: string;
29
31
  currentType: string;
30
32
  prefixWidth: string;
31
33
  cvtWidth: string;
34
+ private _statusChangesSubscription;
35
+ private _value;
32
36
  constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>, cdRef: ChangeDetectorRef);
33
37
  ngOnInit(): void;
34
38
  ngAfterViewInit(): void;
@@ -45,7 +49,9 @@ export declare class CpsInputComponent implements ControlValueAccessor, OnInit,
45
49
  togglePassword(): void;
46
50
  setDisabledState(disabled: boolean): void;
47
51
  onBlur(): void;
52
+ onClickPrefixIcon(): void;
53
+ onFocus(): void;
48
54
  focus(): void;
49
55
  static ɵfac: i0.ɵɵFactoryDeclaration<CpsInputComponent, [{ optional: true; self: true; }, null, null]>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "disabled": "disabled"; "width": "width"; "type": "type"; "loading": "loading"; "clearable": "clearable"; "prefixIcon": "prefixIcon"; "prefixIconSize": "prefixIconSize"; "prefixText": "prefixText"; "hideDetails": "hideDetails"; "persistentClear": "persistentClear"; "value": "value"; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<CpsInputComponent, "cps-input", never, { "label": "label"; "placeholder": "placeholder"; "hint": "hint"; "disabled": "disabled"; "width": "width"; "type": "type"; "loading": "loading"; "clearable": "clearable"; "prefixIcon": "prefixIcon"; "prefixIconClickable": "prefixIconClickable"; "prefixIconSize": "prefixIconSize"; "prefixText": "prefixText"; "hideDetails": "hideDetails"; "persistentClear": "persistentClear"; "error": "error"; "value": "value"; }, { "valueChanged": "valueChanged"; "focused": "focused"; "prefixIconClicked": "prefixIconClicked"; "blurred": "blurred"; }, never, never, true, never>;
51
57
  }
@@ -1,8 +1,8 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, NgControl } from '@angular/forms';
3
3
  import { iconSizeType } from '../cps-icon/cps-icon.component';
4
4
  import * as i0 from "@angular/core";
5
- export declare class CpsSelectComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {
5
+ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit, OnDestroy {
6
6
  private _control;
7
7
  label: string;
8
8
  placeholder: string;
@@ -36,7 +36,6 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
36
36
  isOpened: boolean;
37
37
  optionHighlightedIndex: number;
38
38
  constructor(_control: NgControl);
39
- ngOnChanges(changes: SimpleChanges): void;
40
39
  ngOnInit(): void;
41
40
  ngOnDestroy(): void;
42
41
  private _toggleOptions;
@@ -56,7 +55,6 @@ export declare class CpsSelectComponent implements ControlValueAccessor, OnInit,
56
55
  onTouched: () => void;
57
56
  registerOnChange(fn: any): void;
58
57
  registerOnTouched(fn: any): void;
59
- private _convertValue;
60
58
  writeValue(value: any): void;
61
59
  private updateValue;
62
60
  clear(dd: HTMLElement, event: any): void;
@@ -2,9 +2,10 @@ import { EventEmitter, ElementRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ClickOutsideDirective {
4
4
  private elementRef;
5
+ skipTargets: string[];
5
6
  clickOutside: EventEmitter<void>;
6
7
  constructor(elementRef: ElementRef);
7
8
  onClick(target: any): void;
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<ClickOutsideDirective, never>;
9
- static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[clickOutside]", never, {}, { "clickOutside": "clickOutside"; }, never, never, true, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClickOutsideDirective, "[clickOutside]", never, { "skipTargets": "skipTargets"; }, { "clickOutside": "clickOutside"; }, never, never, true, never>;
10
11
  }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CheckOptionSelectedPipe implements PipeTransform {
4
+ transform(option: any, value: any, multiple: boolean, returnObject: boolean, optionValue: string): boolean;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CheckOptionSelectedPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<CheckOptionSelectedPipe, "checkOptionSelected", true>;
7
+ }
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class LabelByValuePipe implements PipeTransform {
4
- transform(value: string, options: any[], valueKey: string, labelKey: string): string;
4
+ transform(value: any, options: any[], valueKey: string, labelKey: string): string;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<LabelByValuePipe, never>;
6
6
  static ɵpipe: i0.ɵɵPipeDeclaration<LabelByValuePipe, "labelByValue", true>;
7
7
  }
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "cps-ui-kit",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "15 - 16",
6
6
  "@angular/core": "15 - 16",
7
7
  "@angular/forms": "15 - 16",
8
8
  "rxjs": "^7.8.0",
9
- "zone.js": "^0.12.0"
9
+ "zone.js": "^0.12.0",
10
+ "@types/lodash-es": "^4.17.7",
11
+ "lodash-es": "^4.17.21",
12
+ "primeng": "^15.4.1"
10
13
  },
11
14
  "repository": {
12
15
  "type": "git",
package/public-api.d.ts CHANGED
@@ -8,4 +8,5 @@ export * from './lib/components/cps-radio/cps-radio.component';
8
8
  export * from './lib/components/cps-tag/cps-tag.component';
9
9
  export * from './lib/components/cps-chip/cps-chip.component';
10
10
  export * from './lib/components/cps-progress-linear/cps-progress-linear.component';
11
+ export * from './lib/components/cps-datepicker/cps-datepicker.component';
11
12
  export * from './lib/utils/colors-utils';