myrta-ui 1.1.91 → 1.1.93

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.
@@ -0,0 +1,63 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DateCalendarComponent implements OnInit {
4
+ private _detector;
5
+ selectedDate: Date | null;
6
+ dateSelected: EventEmitter<Date>;
7
+ close: EventEmitter<void>;
8
+ currentMonth: number;
9
+ currentYear: number;
10
+ view: 'days' | 'months' | 'years';
11
+ readonly monthNames: string[];
12
+ readonly daysOfWeek: string[];
13
+ readonly months: number[];
14
+ private _minDate;
15
+ private _maxDate;
16
+ private _minDateStr;
17
+ private _maxDateStr;
18
+ private calendarDaysCache;
19
+ constructor(_detector: ChangeDetectorRef);
20
+ ngOnInit(): void;
21
+ set minDate(value: string | null);
22
+ get minDate(): string | null;
23
+ set maxDate(value: string | null);
24
+ get maxDate(): string | null;
25
+ private updateDateBounds;
26
+ get headerText(): string;
27
+ switchView(): void;
28
+ getCalendarDays(): {
29
+ day: number;
30
+ month: number;
31
+ year: number;
32
+ }[];
33
+ getYears(): number[];
34
+ isSelected(day: {
35
+ day: number;
36
+ month: number;
37
+ year: number;
38
+ }): boolean;
39
+ isMonthSelected(month: number): boolean;
40
+ isYearSelected(year: number): boolean;
41
+ isDateEnabled(day: {
42
+ day: number;
43
+ month: number;
44
+ year: number;
45
+ }): boolean;
46
+ isMonthDisabled(month: number): boolean;
47
+ isYearDisabled(year: number): boolean;
48
+ selectDate(day: {
49
+ day: number;
50
+ month: number;
51
+ year: number;
52
+ }): void;
53
+ selectMonth(month: number): void;
54
+ selectYear(year: number): void;
55
+ changeMonth(offset: number): void;
56
+ changeYearRange(offset: number): void;
57
+ isPreviousMonthDisabled(): boolean;
58
+ isNextMonthDisabled(): boolean;
59
+ isPreviousYearRangeDisabled(): boolean;
60
+ isNextYearRangeDisabled(): boolean;
61
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateCalendarComponent, never>;
62
+ static ɵcmp: i0.ɵɵComponentDeclaration<DateCalendarComponent, "mrx-date-calendar", never, { "selectedDate": "selectedDate"; "minDate": "minDate"; "maxDate": "maxDate"; }, { "dateSelected": "dateSelected"; "close": "close"; }, never, never>;
63
+ }
@@ -0,0 +1,14 @@
1
+ export declare function formatDate(date: Date, format: string): string;
2
+ export declare function toOutputFormat(date: Date): string;
3
+ export declare function isValidDate(date: Date): boolean;
4
+ export declare function getDaysInMonth(year: number, month: number): number;
5
+ export declare function isDateInRange(date: Date, minDate: string | null, maxDate: string | null): boolean;
6
+ export declare function clampDate(date: Date, minDate: string | null, maxDate: string | null): Date;
7
+ export declare function getRangeErrorMessage(date: Date, minDate: string | null, maxDate: string | null): string;
8
+ export declare function parseInputDate(dateStr: string): Date | null;
9
+ export declare function adjustInvalidDate(year: number, month: number, day: number): {
10
+ year: number;
11
+ month: number;
12
+ day: number;
13
+ };
14
+ export declare const cleanDate: (date: string) => Date;
@@ -0,0 +1,65 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { Overlay } from '@angular/cdk/overlay';
4
+ import { Field } from '../../../services';
5
+ import { InputDateSizesTypes, InputDateValueTypes } from './input-date.enum';
6
+ import { InputDateTimeValueTypes, InputDateTimeValueWithId } from '../input-date-time/models/input-date-time.model';
7
+ import { PositionType } from '../../../enums/overlay';
8
+ import * as i0 from "@angular/core";
9
+ export declare class InputDateComponent implements OnInit, OnDestroy, ControlValueAccessor {
10
+ private _overlay;
11
+ private _detector;
12
+ private _elementRef;
13
+ private _clickSubscription;
14
+ private _overlayRef;
15
+ displayValue: string;
16
+ selectedDate: Date | null;
17
+ mask: string;
18
+ errorMessage: string | null;
19
+ uuid: string;
20
+ fields: Field[];
21
+ format: string;
22
+ minDate: string | null;
23
+ maxDate: string | null;
24
+ isSilentValidation: boolean;
25
+ isManualInput: boolean;
26
+ closeAfterSelect: boolean;
27
+ required: boolean;
28
+ size: InputDateSizesTypes;
29
+ customClasses: string;
30
+ disabled: boolean;
31
+ readonly: boolean;
32
+ placeholder: string;
33
+ popupPosition: PositionType;
34
+ invalid: boolean;
35
+ invalidMessage: string | string[];
36
+ checkInvalid: true | false | null;
37
+ changed: EventEmitter<InputDateTimeValueTypes>;
38
+ modelChange: EventEmitter<InputDateTimeValueWithId>;
39
+ blurred: EventEmitter<InputDateTimeValueWithId>;
40
+ dateInput: ElementRef;
41
+ private onChange;
42
+ private onTouched;
43
+ constructor(_overlay: Overlay, _detector: ChangeDetectorRef, _elementRef: ElementRef);
44
+ ngOnInit(): void;
45
+ ngOnDestroy(): void;
46
+ get checkValidClasses(): string;
47
+ get getClasses(): string;
48
+ get isViewCleanIcon(): boolean;
49
+ writeValue(value: string): void;
50
+ registerOnChange(fn: (value: string) => void): void;
51
+ registerOnTouched(fn: () => void): void;
52
+ setDisabledState(isDisabled: boolean): void;
53
+ set value(value: string);
54
+ onInput(event: Event): void;
55
+ private processInput;
56
+ onBlur(): void;
57
+ openCalendar(): void;
58
+ onDateSelected(date: Date): void;
59
+ closeCalendar(): void;
60
+ clickToIconCalendar(): void;
61
+ clickToIconClear(): void;
62
+ updateValue(insideValue: InputDateValueTypes): void;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputDateComponent, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputDateComponent, "mrx-input-date", never, { "fields": "fields"; "format": "format"; "minDate": "minDate"; "maxDate": "maxDate"; "isSilentValidation": "isSilentValidation"; "isManualInput": "isManualInput"; "closeAfterSelect": "closeAfterSelect"; "required": "required"; "size": "size"; "customClasses": "customClasses"; "disabled": "disabled"; "readonly": "readonly"; "placeholder": "placeholder"; "popupPosition": "popupPosition"; "invalid": "invalid"; "invalidMessage": "invalidMessage"; "checkInvalid": "checkInvalid"; }, { "changed": "changed"; "modelChange": "modelChange"; "blurred": "blurred"; }, never, never>;
65
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum InputDateSizesEnum {
2
+ 'small' = "mrx-input-date-sm",
3
+ 'medium' = "mrx-input-date-md",
4
+ 'large' = "mrx-input-date-lg"
5
+ }
6
+ export declare type InputDateSizesTypes = 'small' | 'medium' | 'large';
7
+ export declare type InputDateValueTypes = string;
8
+ export interface InputDateValueWithId {
9
+ value: InputDateValueTypes;
10
+ id: string;
11
+ }
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./input-date.component";
3
+ import * as i2 from "./components/date-calendar/date-calendar.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "../../error-message/error-message.module";
7
+ import * as i6 from "../../label/label.module";
8
+ import * as i7 from "../../save-state/save-state.module";
9
+ import * as i8 from "ngx-mask";
10
+ export declare class InputDateModule {
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputDateModule, never>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<InputDateModule, [typeof i1.InputDateComponent, typeof i2.DateCalendarComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.ErrorMessageModule, typeof i6.LabelModule, typeof i7.SaveStateModule, typeof i8.NgxMaskModule], [typeof i1.InputDateComponent]>;
13
+ static ɵinj: i0.ɵɵInjectorDeclaration<InputDateModule>;
14
+ }
@@ -53,13 +53,11 @@ export declare class InputDateTimeComponent implements ControlValueAccessor, OnC
53
53
  private get isValidModels();
54
54
  get isViewCleanIcon(): boolean;
55
55
  get checkValidClasses(): string;
56
- private _getDateFromTimezone;
57
56
  private _checkExtraTime;
58
57
  clickToIconCalendar(): void;
59
58
  clickToIconClear(): void;
60
59
  private updateValueModel;
61
60
  private updateValuesArray;
62
- private dateFormattingOutput;
63
61
  private invalidMessageOn;
64
62
  private invalidMessageOff;
65
63
  updateDateValue(dateInput: HTMLInputElement): void;
@@ -0,0 +1,13 @@
1
+ import { ConnectedPosition } from '@angular/cdk/overlay';
2
+ export declare type PositionType = 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
3
+ export declare enum PositionEnum {
4
+ Top = "top",
5
+ Bottom = "bottom",
6
+ Left = "left",
7
+ Right = "right",
8
+ TopStart = "top-start",
9
+ TopEnd = "top-end",
10
+ BottomStart = "bottom-start",
11
+ BottomEnd = "bottom-end"
12
+ }
13
+ export declare const PositionStrategyEnum: Record<PositionType, ConnectedPosition[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrta-ui",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.3.0",
6
6
  "@angular/core": "^13.3.0",
package/public-api.d.ts CHANGED
@@ -103,10 +103,13 @@ export * from './lib/components/form/input-datepicker/input-datepicker.module';
103
103
  export * from './lib/components/form/input-datepicker/input-datepicker.component';
104
104
  export * from './lib/components/form/input-datepicker/models/input-datepicker.model';
105
105
  export * from './lib/components/form/input-datepicker/input-datepicker.enum';
106
+ export * from './lib/components/form/input-date/input-date.module';
107
+ export * from './lib/components/form/input-date/input-date.component';
106
108
  export * from './lib/components/form/input-date-time/input-date-time.module';
107
109
  export * from './lib/components/form/input-date-time/input-date-time.component';
108
- export * from './lib/components/form/input-date-time/models/input-date-time.model';
110
+ export * from './lib/components/form/input-date-time/input-date-time.enum';
109
111
  export * from './lib/components/form/input-date-time/enum/timezone';
112
+ export * from './lib/components/form/input-date-time/models/input-date-time.model';
110
113
  export * from './lib/components/form/input-timepicker/input-timepicker.module';
111
114
  export * from './lib/components/form/input-timepicker/input-timepicker.component';
112
115
  export * from './lib/components/form/editor/editor.module';