@stemy/ngx-utils 19.9.41 → 19.9.43
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/fesm2022/stemy-ngx-utils.mjs +279 -105
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/components/calendar/calendar-inputs.d.ts +19 -0
- package/ngx-utils/components/calendar/calendar.component.d.ts +10 -20
- package/ngx-utils/components/date-picker/date-picker.component.d.ts +22 -0
- package/ngx-utils/ngx-utils.imports.d.ts +2 -2
- package/ngx-utils/ngx-utils.module.d.ts +20 -19
- package/ngx-utils/utils/date.utils.d.ts +21 -0
- package/ngx-utils/utils/object.utils.d.ts +2 -0
- package/package.json +1 -1
- package/public_api.d.ts +3 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CalendarInputs {
|
|
3
|
+
readonly value: import("@angular/core").ModelSignal<string | Date | Date[]>;
|
|
4
|
+
readonly min: import("@angular/core").InputSignal<string | Date>;
|
|
5
|
+
readonly max: import("@angular/core").InputSignal<string | Date>;
|
|
6
|
+
readonly disabledDates: import("@angular/core").InputSignal<(string | Date)[]>;
|
|
7
|
+
readonly disabledDays: import("@angular/core").InputSignal<number[]>;
|
|
8
|
+
readonly disabled: import("@angular/core").ModelSignal<boolean>;
|
|
9
|
+
readonly strict: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
readonly testId: import("@angular/core").InputSignalWithTransform<string, unknown>;
|
|
11
|
+
protected readonly minDate: import("@angular/core").Signal<Date>;
|
|
12
|
+
protected readonly maxDate: import("@angular/core").Signal<Date>;
|
|
13
|
+
protected readonly disabledTimestamps: import("@angular/core").Signal<number[]>;
|
|
14
|
+
protected readonly parsedValue: import("@angular/core").Signal<Date | Date[]>;
|
|
15
|
+
protected readonly validatedValue: import("@angular/core").Signal<Date | Date[]>;
|
|
16
|
+
constructor();
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarInputs, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarInputs, "ng-component", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "disabledDays": { "alias": "disabledDays"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "strict": { "alias": "strict"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; }, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CalendarInputs } from "./calendar-inputs";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export interface CalendarCell {
|
|
3
4
|
id: string;
|
|
@@ -6,35 +7,25 @@ export interface CalendarCell {
|
|
|
6
7
|
isDisabled: boolean;
|
|
7
8
|
isSelected: boolean;
|
|
8
9
|
isInDragRange: boolean;
|
|
10
|
+
numValue: number;
|
|
9
11
|
isWeekNum: boolean;
|
|
10
|
-
weekNumber: number | null;
|
|
11
12
|
isRangeStart: boolean;
|
|
12
13
|
isRangeEnd: boolean;
|
|
13
14
|
isFillerStart: boolean;
|
|
14
15
|
isFillerEnd: boolean;
|
|
15
16
|
}
|
|
16
|
-
export declare class CalendarComponent {
|
|
17
|
+
export declare class CalendarComponent extends CalendarInputs {
|
|
17
18
|
readonly months: string[];
|
|
18
19
|
readonly daysOfWeek: string[];
|
|
19
|
-
readonly value: import("@angular/core").ModelSignal<Date | Date[]>;
|
|
20
|
-
readonly min: import("@angular/core").InputSignal<string | Date>;
|
|
21
|
-
readonly max: import("@angular/core").InputSignal<string | Date>;
|
|
22
|
-
readonly disabledDates: import("@angular/core").InputSignal<(string | Date)[]>;
|
|
23
|
-
readonly disabledDays: import("@angular/core").InputSignal<number[]>;
|
|
24
20
|
readonly currentMonth: import("@angular/core").WritableSignal<number>;
|
|
25
21
|
readonly currentYear: import("@angular/core").WritableSignal<number>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
private readonly minDate;
|
|
33
|
-
private readonly maxDate;
|
|
34
|
-
private readonly disabledTimestamps;
|
|
22
|
+
protected readonly isDragging: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
protected readonly dragStartCellDate: import("@angular/core").WritableSignal<Date>;
|
|
24
|
+
protected readonly dragCurrentCellDate: import("@angular/core").WritableSignal<Date>;
|
|
25
|
+
protected readonly initialSelectedStateBeforeDrag: import("@angular/core").WritableSignal<Map<number, boolean>>;
|
|
26
|
+
protected readonly dragTargetState: import("@angular/core").WritableSignal<boolean>;
|
|
27
|
+
protected isInitialized: boolean;
|
|
35
28
|
readonly isMultiSelect: import("@angular/core").Signal<boolean>;
|
|
36
|
-
private readonly isDayOfWeekDisabledFn;
|
|
37
|
-
readonly validatedValue: import("@angular/core").Signal<Date | Date[]>;
|
|
38
29
|
readonly canGoPrev: import("@angular/core").Signal<boolean>;
|
|
39
30
|
readonly canGoNext: import("@angular/core").Signal<boolean>;
|
|
40
31
|
readonly calendarCells: import("@angular/core").Signal<CalendarCell[]>;
|
|
@@ -46,7 +37,6 @@ export declare class CalendarComponent {
|
|
|
46
37
|
onMouseEnter(cell: CalendarCell): void;
|
|
47
38
|
onGridMouseLeave(): void;
|
|
48
39
|
onMouseUpGlobal(): void;
|
|
49
|
-
private findClosestValidDate;
|
|
50
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "calendar", never, {
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "calendar", never, {}, {}, never, never, false, never>;
|
|
52
42
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
2
|
+
import { AutoPlacementOptions } from "@floating-ui/dom";
|
|
3
|
+
import { CalendarInputs } from "../calendar/calendar-inputs";
|
|
4
|
+
import { DropdownDirective } from "../../directives/dropdown.directive";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DatePickerComponent extends CalendarInputs implements ControlValueAccessor {
|
|
7
|
+
readonly autoPlacement: AutoPlacementOptions;
|
|
8
|
+
readonly inputValue: import("@angular/core").Signal<any>;
|
|
9
|
+
readonly pickerDropdown: import("@angular/core").Signal<DropdownDirective>;
|
|
10
|
+
onChange: any;
|
|
11
|
+
onTouched: any;
|
|
12
|
+
registerOnChange(fn: any): void;
|
|
13
|
+
registerOnTouched(fn: any): void;
|
|
14
|
+
writeValue(value: Date): void;
|
|
15
|
+
setDisabledState(isDisabled: boolean): void;
|
|
16
|
+
onPickerChange(date: any): void;
|
|
17
|
+
onFocus(): void;
|
|
18
|
+
onBlur(ev: FocusEvent): void;
|
|
19
|
+
clear(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "date-picker", never, {}, {}, never, never, false, never>;
|
|
22
|
+
}
|
|
@@ -67,9 +67,9 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
|
|
|
67
67
|
import { UploadComponent } from "./components/upload/upload.component";
|
|
68
68
|
import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
|
|
69
69
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
|
|
70
|
-
export declare const directives: (typeof
|
|
70
|
+
export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownDirective | typeof DropdownContentDirective | typeof DropdownToggleDirective | typeof TabsItemDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
71
71
|
export declare const components: (typeof ChipsComponent | typeof CloseBtnComponent | typeof CodeEditorComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent | typeof WysiwygComponent)[];
|
|
72
|
-
export declare const providers: (typeof
|
|
72
|
+
export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof EventsService | typeof AclService | typeof BaseHttpClient | typeof StorageService | typeof CacheService | typeof BaseHttpService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof FormatterService | typeof GlobalTemplateService | typeof HrefSerializer | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof SocketService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
|
|
73
73
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
74
74
|
useClass: typeof DragDropEventPlugin;
|
|
75
75
|
multi: boolean;
|
|
@@ -58,24 +58,25 @@ import * as i54 from "./components/calendar/calendar.component";
|
|
|
58
58
|
import * as i55 from "./components/chips/chips.component";
|
|
59
59
|
import * as i56 from "./components/close-btn/close-btn.component";
|
|
60
60
|
import * as i57 from "./components/code-editor/code-editor.component";
|
|
61
|
-
import * as i58 from "./components/
|
|
62
|
-
import * as i59 from "./components/
|
|
63
|
-
import * as i60 from "./components/
|
|
64
|
-
import * as i61 from "./components/dynamic-table
|
|
65
|
-
import * as i62 from "./components/
|
|
66
|
-
import * as i63 from "./components/
|
|
67
|
-
import * as i64 from "./components/
|
|
68
|
-
import * as i65 from "./components/icon
|
|
69
|
-
import * as i66 from "./components/
|
|
70
|
-
import * as i67 from "./components/interactive-canvas/interactive-
|
|
71
|
-
import * as i68 from "./components/interactive-canvas/interactive-
|
|
72
|
-
import * as i69 from "./components/interactive-canvas/interactive-
|
|
73
|
-
import * as i70 from "./components/
|
|
74
|
-
import * as i71 from "./components/
|
|
75
|
-
import * as i72 from "./components/
|
|
76
|
-
import * as i73 from "./components/
|
|
77
|
-
import * as i74 from "
|
|
78
|
-
import * as i75 from "@angular/
|
|
61
|
+
import * as i58 from "./components/date-picker/date-picker.component";
|
|
62
|
+
import * as i59 from "./components/drop-list/drop-list.component";
|
|
63
|
+
import * as i60 from "./components/dropdown-box/dropdown-box.component";
|
|
64
|
+
import * as i61 from "./components/dynamic-table/dynamic-table.component";
|
|
65
|
+
import * as i62 from "./components/dynamic-table-cell/dynamic-table-cell.component";
|
|
66
|
+
import * as i63 from "./components/fake-module/fake-module.component";
|
|
67
|
+
import * as i64 from "./components/pagination-menu/pagination-menu.component";
|
|
68
|
+
import * as i65 from "./components/icon/icon.component";
|
|
69
|
+
import * as i66 from "./components/icon-default/icon-default.component";
|
|
70
|
+
import * as i67 from "./components/interactive-canvas/interactive-canvas.component";
|
|
71
|
+
import * as i68 from "./components/interactive-canvas/interactive-item.component";
|
|
72
|
+
import * as i69 from "./components/interactive-canvas/interactive-circle.component";
|
|
73
|
+
import * as i70 from "./components/interactive-canvas/interactive-rect.component";
|
|
74
|
+
import * as i71 from "./components/tabs/tabs.component";
|
|
75
|
+
import * as i72 from "./components/unordered-list/unordered-list.component";
|
|
76
|
+
import * as i73 from "./components/upload/upload.component";
|
|
77
|
+
import * as i74 from "./components/wysiwyg/wysiwyg.component";
|
|
78
|
+
import * as i75 from "@angular/common";
|
|
79
|
+
import * as i76 from "@angular/forms";
|
|
79
80
|
export declare function loadBaseUrl(): string;
|
|
80
81
|
export declare function loadBaseHref(baseUrl: string): string;
|
|
81
82
|
export declare function getRootElement(): HTMLElement;
|
|
@@ -86,6 +87,6 @@ export declare class NgxUtilsModule {
|
|
|
86
87
|
static provideUtils(config?: IModuleConfig): EnvironmentProviders;
|
|
87
88
|
static useDynamic(moduleInfo: DynamicModuleInfo): ModuleWithProviders<NgxUtilsModule>;
|
|
88
89
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxUtilsModule, never>;
|
|
89
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxUtilsModule, [typeof i1.ChunkPipe, typeof i2.EntriesPipe, typeof i3.ExtraItemPropertiesPipe, typeof i4.FilterPipe, typeof i5.FindPipe, typeof i6.FormatNumberPipe, typeof i7.GetOffsetPipe, typeof i8.GetTypePipe, typeof i9.GetValuePipe, typeof i10.GlobalTemplatePipe, typeof i11.GroupByPipe, typeof i12.IncludesPipe, typeof i13.IsTypePipe, typeof i14.JoinPipe, typeof i15.KeysPipe, typeof i16.MapPipe, typeof i17.MaxPipe, typeof i18.MinPipe, typeof i19.PopPipe, typeof i20.ReducePipe, typeof i21.RemapPipe, typeof i22.ReplacePipe, typeof i23.ReversePipe, typeof i24.RoundPipe, typeof i25.SafeHtmlPipe, typeof i26.ShiftPipe, typeof i27.SplitPipe, typeof i28.SyncAsyncPipe, typeof i29.TranslatePipe, typeof i30.ValuesPipe, typeof i31.AsyncMethodBase, typeof i32.AsyncMethodDirective, typeof i33.AsyncMethodTargetDirective, typeof i34.BackgroundDirective, typeof i35.ComponentLoaderDirective, typeof i36.DynamicTableTemplateDirective, typeof i37.GlobalTemplateDirective, typeof i38.IconDirective, typeof i39.NgxTemplateOutletDirective, typeof i40.PaginationDirective, typeof i41.PaginationItemDirective, typeof i42.ResourceIfDirective, typeof i43.StickyDirective, typeof i44.StickyClassDirective, typeof i45.DropdownDirective, typeof i46.DropdownContentDirective, typeof i47.DropdownToggleDirective, typeof i48.TabsItemDirective, typeof i49.TabsTemplateDirective, typeof i50.UnorderedListItemDirective, typeof i51.UnorderedListTemplateDirective, typeof i52.BtnComponent, typeof i53.BtnDefaultComponent, typeof i54.CalendarComponent, typeof i55.ChipsComponent, typeof i56.CloseBtnComponent, typeof i57.CodeEditorComponent, typeof i58.
|
|
90
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxUtilsModule, [typeof i1.ChunkPipe, typeof i2.EntriesPipe, typeof i3.ExtraItemPropertiesPipe, typeof i4.FilterPipe, typeof i5.FindPipe, typeof i6.FormatNumberPipe, typeof i7.GetOffsetPipe, typeof i8.GetTypePipe, typeof i9.GetValuePipe, typeof i10.GlobalTemplatePipe, typeof i11.GroupByPipe, typeof i12.IncludesPipe, typeof i13.IsTypePipe, typeof i14.JoinPipe, typeof i15.KeysPipe, typeof i16.MapPipe, typeof i17.MaxPipe, typeof i18.MinPipe, typeof i19.PopPipe, typeof i20.ReducePipe, typeof i21.RemapPipe, typeof i22.ReplacePipe, typeof i23.ReversePipe, typeof i24.RoundPipe, typeof i25.SafeHtmlPipe, typeof i26.ShiftPipe, typeof i27.SplitPipe, typeof i28.SyncAsyncPipe, typeof i29.TranslatePipe, typeof i30.ValuesPipe, typeof i31.AsyncMethodBase, typeof i32.AsyncMethodDirective, typeof i33.AsyncMethodTargetDirective, typeof i34.BackgroundDirective, typeof i35.ComponentLoaderDirective, typeof i36.DynamicTableTemplateDirective, typeof i37.GlobalTemplateDirective, typeof i38.IconDirective, typeof i39.NgxTemplateOutletDirective, typeof i40.PaginationDirective, typeof i41.PaginationItemDirective, typeof i42.ResourceIfDirective, typeof i43.StickyDirective, typeof i44.StickyClassDirective, typeof i45.DropdownDirective, typeof i46.DropdownContentDirective, typeof i47.DropdownToggleDirective, typeof i48.TabsItemDirective, typeof i49.TabsTemplateDirective, typeof i50.UnorderedListItemDirective, typeof i51.UnorderedListTemplateDirective, typeof i52.BtnComponent, typeof i53.BtnDefaultComponent, typeof i54.CalendarComponent, typeof i55.ChipsComponent, typeof i56.CloseBtnComponent, typeof i57.CodeEditorComponent, typeof i58.DatePickerComponent, typeof i59.DropListComponent, typeof i60.DropdownBoxComponent, typeof i61.DynamicTableComponent, typeof i62.DynamicTableCellComponent, typeof i63.FakeModuleComponent, typeof i64.PaginationMenuComponent, typeof i65.IconComponent, typeof i66.IconDefaultComponent, typeof i67.InteractiveCanvasComponent, typeof i68.InteractiveItemComponent, typeof i69.InteractiveCircleComponent, typeof i70.InteractiveRectComponent, typeof i71.TabsComponent, typeof i72.UnorderedListComponent, typeof i73.UploadComponent, typeof i74.WysiwygComponent], [typeof i75.CommonModule, typeof i76.FormsModule], [typeof i1.ChunkPipe, typeof i2.EntriesPipe, typeof i3.ExtraItemPropertiesPipe, typeof i4.FilterPipe, typeof i5.FindPipe, typeof i6.FormatNumberPipe, typeof i7.GetOffsetPipe, typeof i8.GetTypePipe, typeof i9.GetValuePipe, typeof i10.GlobalTemplatePipe, typeof i11.GroupByPipe, typeof i12.IncludesPipe, typeof i13.IsTypePipe, typeof i14.JoinPipe, typeof i15.KeysPipe, typeof i16.MapPipe, typeof i17.MaxPipe, typeof i18.MinPipe, typeof i19.PopPipe, typeof i20.ReducePipe, typeof i21.RemapPipe, typeof i22.ReplacePipe, typeof i23.ReversePipe, typeof i24.RoundPipe, typeof i25.SafeHtmlPipe, typeof i26.ShiftPipe, typeof i27.SplitPipe, typeof i28.SyncAsyncPipe, typeof i29.TranslatePipe, typeof i30.ValuesPipe, typeof i31.AsyncMethodBase, typeof i32.AsyncMethodDirective, typeof i33.AsyncMethodTargetDirective, typeof i34.BackgroundDirective, typeof i35.ComponentLoaderDirective, typeof i36.DynamicTableTemplateDirective, typeof i37.GlobalTemplateDirective, typeof i38.IconDirective, typeof i39.NgxTemplateOutletDirective, typeof i40.PaginationDirective, typeof i41.PaginationItemDirective, typeof i42.ResourceIfDirective, typeof i43.StickyDirective, typeof i44.StickyClassDirective, typeof i45.DropdownDirective, typeof i46.DropdownContentDirective, typeof i47.DropdownToggleDirective, typeof i48.TabsItemDirective, typeof i49.TabsTemplateDirective, typeof i50.UnorderedListItemDirective, typeof i51.UnorderedListTemplateDirective, typeof i52.BtnComponent, typeof i53.BtnDefaultComponent, typeof i54.CalendarComponent, typeof i55.ChipsComponent, typeof i56.CloseBtnComponent, typeof i57.CodeEditorComponent, typeof i58.DatePickerComponent, typeof i59.DropListComponent, typeof i60.DropdownBoxComponent, typeof i61.DynamicTableComponent, typeof i62.DynamicTableCellComponent, typeof i63.FakeModuleComponent, typeof i64.PaginationMenuComponent, typeof i65.IconComponent, typeof i66.IconDefaultComponent, typeof i67.InteractiveCanvasComponent, typeof i68.InteractiveItemComponent, typeof i69.InteractiveCircleComponent, typeof i70.InteractiveRectComponent, typeof i71.TabsComponent, typeof i72.UnorderedListComponent, typeof i73.UploadComponent, typeof i74.WysiwygComponent, typeof i76.FormsModule]>;
|
|
90
91
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxUtilsModule>;
|
|
91
92
|
}
|
|
@@ -20,6 +20,27 @@ export declare function isSameDay(a: Date, b: Date): boolean;
|
|
|
20
20
|
* @param date
|
|
21
21
|
*/
|
|
22
22
|
export declare function getISOWeekNumber(date: Date): number;
|
|
23
|
+
/**
|
|
24
|
+
* Convert value to a string with corrected date format (date, date-time)
|
|
25
|
+
* @param value Value to convert to date string
|
|
26
|
+
* @param format Expected date format (date, date-time)
|
|
27
|
+
*/
|
|
28
|
+
export declare function convertToDateFormat(value: any, format?: string): any;
|
|
29
|
+
/**
|
|
30
|
+
* Returns if the day of the week is in the provided date is disabled
|
|
31
|
+
* @param date Checked date
|
|
32
|
+
* @param disabledDays An array of disabled days of the week (0-7, where 0 and 7 both means saturday)
|
|
33
|
+
*/
|
|
34
|
+
export declare function isDayOfWeekDisabled(date: Date, disabledDays?: number[]): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Finds the closest valid date in between the specified conditions
|
|
37
|
+
* @param base Target date
|
|
38
|
+
* @param min Minimum date
|
|
39
|
+
* @param max Maximum date
|
|
40
|
+
* @param disabledTimes An array of disabled dates (midnight timestamps)
|
|
41
|
+
* @param disabledDays An array of disabled days of the week (0-7, where 0 and 7 both means saturday)
|
|
42
|
+
*/
|
|
43
|
+
export declare function findClosestValidDate(base: Date, min: Date | null, max: Date | null, disabledTimes: number[], disabledDays: number[]): Date;
|
|
23
44
|
/**
|
|
24
45
|
* Adds an amount of units to the specified date
|
|
25
46
|
* @param date
|
|
@@ -6,6 +6,8 @@ export declare function defaultPredicate(value: any, key?: any, target?: any, so
|
|
|
6
6
|
export declare function shouldCopyDefault(key: any, value: any): boolean;
|
|
7
7
|
export declare function getType(obj: any): string;
|
|
8
8
|
export declare function isObject(value: any): boolean;
|
|
9
|
+
export declare function isDefined(value: any): boolean;
|
|
10
|
+
export declare function isDate(value: any): value is Date;
|
|
9
11
|
export declare function isString(value: any): value is string;
|
|
10
12
|
export declare function isStringWithValue(value: any): value is string;
|
|
11
13
|
export declare function isFunction(value: any): value is Function;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { AuthGuard } from "./ngx-utils/utils/auth.guard";
|
|
|
8
8
|
export { createTypedProvider, cachedFactory } from "./ngx-utils/utils/cached-factory";
|
|
9
9
|
export { CanvasUtils } from "./ngx-utils/utils/canvas";
|
|
10
10
|
export { md5 } from "./ngx-utils/utils/crypto.utils";
|
|
11
|
-
export { parseValidDate, toMidnight, isSameDay, getISOWeekNumber, addDate, DateUtils } from "./ngx-utils/utils/date.utils";
|
|
11
|
+
export { parseValidDate, toMidnight, isSameDay, getISOWeekNumber, convertToDateFormat, isDayOfWeekDisabled, findClosestValidDate, addDate, DateUtils } from "./ngx-utils/utils/date.utils";
|
|
12
12
|
export { FileUtils } from "./ngx-utils/utils/file.utils";
|
|
13
13
|
export { ForbiddenZone } from "./ngx-utils/utils/forbidden-zone";
|
|
14
14
|
export { GenericValue } from "./ngx-utils/utils/generic-value";
|
|
@@ -23,7 +23,7 @@ export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
|
|
|
23
23
|
export { LoaderUtils } from "./ngx-utils/utils/loader.utils";
|
|
24
24
|
export { EPSILON, normalizeRange, clamp, overflow, isEqual, isZero, MathUtils } from "./ngx-utils/utils/math.utils";
|
|
25
25
|
export { isBrowser, getRoot, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions, DiffEntityResult, diffEntities } from "./ngx-utils/utils/misc";
|
|
26
|
-
export { getType, isObject, isString, isStringWithValue, isFunction, toStringArray, ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
26
|
+
export { getType, isObject, isDefined, isDate, isString, isStringWithValue, isFunction, toStringArray, ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
27
27
|
export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
|
|
28
28
|
export { CancelablePromise, cancelablePromise, impatientPromise, promiseTimeout } from "./ngx-utils/utils/promise.utils";
|
|
29
29
|
export { svgToDataUri, StringUtils } from "./ngx-utils/utils/string.utils";
|
|
@@ -121,6 +121,7 @@ export { CalendarComponent } from "./ngx-utils/components/calendar/calendar.comp
|
|
|
121
121
|
export { ChipsComponent } from "./ngx-utils/components/chips/chips.component";
|
|
122
122
|
export { CloseBtnComponent } from "./ngx-utils/components/close-btn/close-btn.component";
|
|
123
123
|
export { CodeEditorComponent } from "./ngx-utils/components/code-editor/code-editor.component";
|
|
124
|
+
export { DatePickerComponent } from "./ngx-utils/components/date-picker/date-picker.component";
|
|
124
125
|
export { DropListComponent } from "./ngx-utils/components/drop-list/drop-list.component";
|
|
125
126
|
export { DropdownBoxComponent } from "./ngx-utils/components/dropdown-box/dropdown-box.component";
|
|
126
127
|
export { DynamicTableComponent } from "./ngx-utils/components/dynamic-table/dynamic-table.component";
|