@stemy/ngx-utils 19.9.39 → 19.9.40
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 +963 -14
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/components/calendar/calendar.component.d.ts +52 -0
- package/ngx-utils/ngx-utils.imports.d.ts +1 -1
- package/ngx-utils/ngx-utils.module.d.ts +23 -22
- package/ngx-utils/services/constants/calendar-translations.d.ts +2 -0
- package/ngx-utils/services/constants/lang-translations.d.ts +2 -0
- package/ngx-utils/services/language.service.d.ts +0 -1
- package/ngx-utils/services/static-language.service.d.ts +1 -0
- package/ngx-utils/utils/date.utils.d.ts +28 -0
- package/package.json +1 -1
- package/public_api.d.ts +2 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface CalendarCell {
|
|
3
|
+
id: string;
|
|
4
|
+
date: Date | null;
|
|
5
|
+
isCurrentMonth: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
isInDragRange: boolean;
|
|
9
|
+
isWeekNum: boolean;
|
|
10
|
+
weekNumber: number | null;
|
|
11
|
+
isRangeStart: boolean;
|
|
12
|
+
isRangeEnd: boolean;
|
|
13
|
+
isFillerStart: boolean;
|
|
14
|
+
isFillerEnd: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class CalendarComponent {
|
|
17
|
+
readonly months: string[];
|
|
18
|
+
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
|
+
readonly currentMonth: import("@angular/core").WritableSignal<number>;
|
|
25
|
+
readonly currentYear: import("@angular/core").WritableSignal<number>;
|
|
26
|
+
private readonly isDragging;
|
|
27
|
+
private readonly dragStartCellDate;
|
|
28
|
+
private readonly dragCurrentCellDate;
|
|
29
|
+
private readonly initialSelectedStateBeforeDrag;
|
|
30
|
+
private readonly dragTargetState;
|
|
31
|
+
private isInitialized;
|
|
32
|
+
private readonly minDate;
|
|
33
|
+
private readonly maxDate;
|
|
34
|
+
private readonly disabledTimestamps;
|
|
35
|
+
readonly isMultiSelect: import("@angular/core").Signal<boolean>;
|
|
36
|
+
private readonly isDayOfWeekDisabledFn;
|
|
37
|
+
readonly validatedValue: import("@angular/core").Signal<Date | Date[]>;
|
|
38
|
+
readonly canGoPrev: import("@angular/core").Signal<boolean>;
|
|
39
|
+
readonly canGoNext: import("@angular/core").Signal<boolean>;
|
|
40
|
+
readonly calendarCells: import("@angular/core").Signal<CalendarCell[]>;
|
|
41
|
+
constructor();
|
|
42
|
+
private isMonthAvailable;
|
|
43
|
+
prevMonth(): void;
|
|
44
|
+
nextMonth(): void;
|
|
45
|
+
onMouseDown(cell: CalendarCell, event: MouseEvent): void;
|
|
46
|
+
onMouseEnter(cell: CalendarCell): void;
|
|
47
|
+
onGridMouseLeave(): void;
|
|
48
|
+
onMouseUpGlobal(): void;
|
|
49
|
+
private findClosestValidDate;
|
|
50
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "calendar", 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; }; }, { "value": "valueChange"; }, never, never, false, never>;
|
|
52
|
+
}
|
|
@@ -69,7 +69,7 @@ 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
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 FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe | typeof BaseHttpClient | typeof BaseHttpService | typeof AuthGuard | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof HrefSerializer | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof CacheService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof DeviceDetectorService | {
|
|
73
73
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
74
74
|
useClass: typeof DragDropEventPlugin;
|
|
75
75
|
multi: boolean;
|
|
@@ -54,27 +54,28 @@ import * as i50 from "./directives/unordered-list-item.directive";
|
|
|
54
54
|
import * as i51 from "./directives/unordered-list-template.directive";
|
|
55
55
|
import * as i52 from "./components/btn/btn.component";
|
|
56
56
|
import * as i53 from "./components/btn-default/btn-default.component";
|
|
57
|
-
import * as i54 from "./components/
|
|
58
|
-
import * as i55 from "./components/
|
|
59
|
-
import * as i56 from "./components/
|
|
60
|
-
import * as i57 from "./components/
|
|
61
|
-
import * as i58 from "./components/
|
|
62
|
-
import * as i59 from "./components/
|
|
63
|
-
import * as i60 from "./components/dynamic-table
|
|
64
|
-
import * as i61 from "./components/
|
|
65
|
-
import * as i62 from "./components/
|
|
66
|
-
import * as i63 from "./components/
|
|
67
|
-
import * as i64 from "./components/icon
|
|
68
|
-
import * as i65 from "./components/
|
|
69
|
-
import * as i66 from "./components/interactive-canvas/interactive-
|
|
70
|
-
import * as i67 from "./components/interactive-canvas/interactive-
|
|
71
|
-
import * as i68 from "./components/interactive-canvas/interactive-
|
|
72
|
-
import * as i69 from "./components/
|
|
73
|
-
import * as i70 from "./components/
|
|
74
|
-
import * as i71 from "./components/
|
|
75
|
-
import * as i72 from "./components/
|
|
76
|
-
import * as i73 from "
|
|
77
|
-
import * as i74 from "@angular/
|
|
57
|
+
import * as i54 from "./components/calendar/calendar.component";
|
|
58
|
+
import * as i55 from "./components/chips/chips.component";
|
|
59
|
+
import * as i56 from "./components/close-btn/close-btn.component";
|
|
60
|
+
import * as i57 from "./components/code-editor/code-editor.component";
|
|
61
|
+
import * as i58 from "./components/drop-list/drop-list.component";
|
|
62
|
+
import * as i59 from "./components/dropdown-box/dropdown-box.component";
|
|
63
|
+
import * as i60 from "./components/dynamic-table/dynamic-table.component";
|
|
64
|
+
import * as i61 from "./components/dynamic-table-cell/dynamic-table-cell.component";
|
|
65
|
+
import * as i62 from "./components/fake-module/fake-module.component";
|
|
66
|
+
import * as i63 from "./components/pagination-menu/pagination-menu.component";
|
|
67
|
+
import * as i64 from "./components/icon/icon.component";
|
|
68
|
+
import * as i65 from "./components/icon-default/icon-default.component";
|
|
69
|
+
import * as i66 from "./components/interactive-canvas/interactive-canvas.component";
|
|
70
|
+
import * as i67 from "./components/interactive-canvas/interactive-item.component";
|
|
71
|
+
import * as i68 from "./components/interactive-canvas/interactive-circle.component";
|
|
72
|
+
import * as i69 from "./components/interactive-canvas/interactive-rect.component";
|
|
73
|
+
import * as i70 from "./components/tabs/tabs.component";
|
|
74
|
+
import * as i71 from "./components/unordered-list/unordered-list.component";
|
|
75
|
+
import * as i72 from "./components/upload/upload.component";
|
|
76
|
+
import * as i73 from "./components/wysiwyg/wysiwyg.component";
|
|
77
|
+
import * as i74 from "@angular/common";
|
|
78
|
+
import * as i75 from "@angular/forms";
|
|
78
79
|
export declare function loadBaseUrl(): string;
|
|
79
80
|
export declare function loadBaseHref(baseUrl: string): string;
|
|
80
81
|
export declare function getRootElement(): HTMLElement;
|
|
@@ -85,6 +86,6 @@ export declare class NgxUtilsModule {
|
|
|
85
86
|
static provideUtils(config?: IModuleConfig): EnvironmentProviders;
|
|
86
87
|
static useDynamic(moduleInfo: DynamicModuleInfo): ModuleWithProviders<NgxUtilsModule>;
|
|
87
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxUtilsModule, never>;
|
|
88
|
-
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.
|
|
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.DropListComponent, typeof i59.DropdownBoxComponent, typeof i60.DynamicTableComponent, typeof i61.DynamicTableCellComponent, typeof i62.FakeModuleComponent, typeof i63.PaginationMenuComponent, typeof i64.IconComponent, typeof i65.IconDefaultComponent, typeof i66.InteractiveCanvasComponent, typeof i67.InteractiveItemComponent, typeof i68.InteractiveCircleComponent, typeof i69.InteractiveRectComponent, typeof i70.TabsComponent, typeof i71.UnorderedListComponent, typeof i72.UploadComponent, typeof i73.WysiwygComponent], [typeof i74.CommonModule, typeof i75.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.DropListComponent, typeof i59.DropdownBoxComponent, typeof i60.DynamicTableComponent, typeof i61.DynamicTableCellComponent, typeof i62.FakeModuleComponent, typeof i63.PaginationMenuComponent, typeof i64.IconComponent, typeof i65.IconDefaultComponent, typeof i66.InteractiveCanvasComponent, typeof i67.InteractiveItemComponent, typeof i68.InteractiveCircleComponent, typeof i69.InteractiveRectComponent, typeof i70.TabsComponent, typeof i71.UnorderedListComponent, typeof i72.UploadComponent, typeof i73.WysiwygComponent, typeof i75.FormsModule]>;
|
|
89
90
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxUtilsModule>;
|
|
90
91
|
}
|
|
@@ -12,7 +12,6 @@ export declare class LanguageService extends StaticLanguageService {
|
|
|
12
12
|
get $settings(): Observable<ILanguageSetting>;
|
|
13
13
|
protected initService(): void;
|
|
14
14
|
initFromSettings(): Promise<any>;
|
|
15
|
-
protected selectLanguage(lang: string): string;
|
|
16
15
|
protected useLanguage(lang: string): Promise<ITranslations>;
|
|
17
16
|
getDictionary(lang: string): Promise<ITranslations>;
|
|
18
17
|
protected getMergedDictionary(lang: string, ext: string): Promise<ITranslations>;
|
|
@@ -35,6 +35,7 @@ export declare class StaticLanguageService implements ILanguageService {
|
|
|
35
35
|
protected overrideTranslations: GlobalTranslations;
|
|
36
36
|
protected mergedTranslations: GlobalTranslations;
|
|
37
37
|
constructor(events: EventsService, storage: StorageService, configs: IConfigService, promises: IPromiseService, client: BaseHttpClient);
|
|
38
|
+
protected selectLanguage(lang: string): string;
|
|
38
39
|
protected initService(): void;
|
|
39
40
|
replaceLanguages(languages: string[]): void;
|
|
40
41
|
addLanguages(languages: string[]): void;
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
import { DurationUnit } from "../common-types";
|
|
2
|
+
/**
|
|
3
|
+
* Helper function that parses ISO string or Date object to a real Date object if its possible
|
|
4
|
+
* @param value
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseValidDate(value: string | Date | null): Date | null;
|
|
7
|
+
/**
|
|
8
|
+
* Function that converts the provided date to midnight
|
|
9
|
+
* @param value
|
|
10
|
+
*/
|
|
11
|
+
export declare function toMidnight(value: Date): Date;
|
|
12
|
+
/**
|
|
13
|
+
* Compares two dates if they are on the same day
|
|
14
|
+
* @param a
|
|
15
|
+
* @param b
|
|
16
|
+
*/
|
|
17
|
+
export declare function isSameDay(a: Date, b: Date): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the ISO week number of a specified date
|
|
20
|
+
* @param date
|
|
21
|
+
*/
|
|
22
|
+
export declare function getISOWeekNumber(date: Date): number;
|
|
23
|
+
/**
|
|
24
|
+
* Adds an amount of units to the specified date
|
|
25
|
+
* @param date
|
|
26
|
+
* @param amount
|
|
27
|
+
* @param unit
|
|
28
|
+
*/
|
|
29
|
+
export declare function addDate(date: Date, amount?: number, unit?: DurationUnit): Date;
|
|
2
30
|
export declare class DateUtils {
|
|
3
31
|
static isHoliday(date: Date): boolean;
|
|
4
32
|
static isBusinessDay(date: Date): boolean;
|
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 { DateUtils } from "./ngx-utils/utils/date.utils";
|
|
11
|
+
export { parseValidDate, toMidnight, isSameDay, getISOWeekNumber, 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";
|
|
@@ -117,6 +117,7 @@ export { UnorderedListItemDirective } from "./ngx-utils/directives/unordered-lis
|
|
|
117
117
|
export { UnorderedListTemplateDirective } from "./ngx-utils/directives/unordered-list-template.directive";
|
|
118
118
|
export { BtnComponent } from "./ngx-utils/components/btn/btn.component";
|
|
119
119
|
export { BtnDefaultComponent } from "./ngx-utils/components/btn-default/btn-default.component";
|
|
120
|
+
export { CalendarComponent } from "./ngx-utils/components/calendar/calendar.component";
|
|
120
121
|
export { ChipsComponent } from "./ngx-utils/components/chips/chips.component";
|
|
121
122
|
export { CloseBtnComponent } from "./ngx-utils/components/close-btn/close-btn.component";
|
|
122
123
|
export { CodeEditorComponent } from "./ngx-utils/components/code-editor/code-editor.component";
|