@stemy/ngx-utils 19.0.13 → 19.1.1
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 +183 -65
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +2 -2
- package/ngx-utils/components/drop-list/drop-list.component.d.ts +35 -0
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +4 -5
- package/ngx-utils/ngx-utils.imports.d.ts +2 -1
- package/ngx-utils/ngx-utils.module.d.ts +7 -6
- package/ngx-utils/utils/misc.d.ts +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +4 -2
|
@@ -368,9 +368,9 @@ export type DragDropEvent<K extends string = "item", T = any> = {
|
|
|
368
368
|
elem: HTMLElement;
|
|
369
369
|
source?: T;
|
|
370
370
|
};
|
|
371
|
-
export type
|
|
371
|
+
export type DragEventHandler<R = boolean, K extends string = "item"> = (ev: DragDropEvent<K>) => R;
|
|
372
372
|
export type ITableDragEvent = DragDropEvent;
|
|
373
|
-
export type DynamicTableDragHandler<R = boolean> =
|
|
373
|
+
export type DynamicTableDragHandler<R = boolean> = DragEventHandler<R>;
|
|
374
374
|
export declare class ResourceIfContext {
|
|
375
375
|
resource: string;
|
|
376
376
|
url: string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnChanges, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
3
|
+
import { DragEventHandler } from "../../common-types";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type DropListItem = Record<string, any>;
|
|
6
|
+
type DropListId = string | number;
|
|
7
|
+
export declare class DropListComponent implements OnChanges, ControlValueAccessor {
|
|
8
|
+
private cdr;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
unique: boolean;
|
|
11
|
+
idField: string;
|
|
12
|
+
labelField: string;
|
|
13
|
+
value: DropListId[];
|
|
14
|
+
context: DropListItem[];
|
|
15
|
+
prepareItem: (i: DropListItem) => void;
|
|
16
|
+
checkFn: DragEventHandler<boolean, "data">;
|
|
17
|
+
itemTemplate: TemplateRef<any>;
|
|
18
|
+
onChange: Function;
|
|
19
|
+
onTouched: Function;
|
|
20
|
+
valueMap: Record<DropListId, DropListItem>;
|
|
21
|
+
remove: (id: DropListId) => void;
|
|
22
|
+
constructor(cdr: ChangeDetectorRef);
|
|
23
|
+
onDragEnter(ev: DragEvent, elem: HTMLElement, data: any): void;
|
|
24
|
+
onDragLeave(ev: DragEvent, elem: HTMLElement): void;
|
|
25
|
+
onDrop(ev: DragEvent, elem: HTMLElement): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
+
registerOnChange(fn: any): void;
|
|
28
|
+
registerOnTouched(fn: any): void;
|
|
29
|
+
setDisabledState(val: boolean): void;
|
|
30
|
+
writeValue(obj: any): void;
|
|
31
|
+
protected changeValue(value: DropListId[]): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropListComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropListComponent, "drop-list", never, { "disabled": { "alias": "disabled"; "required": false; }; "unique": { "alias": "unique"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "labelField": { "alias": "labelField"; "required": false; }; "value": { "alias": "value"; "required": false; }; "context": { "alias": "context"; "required": false; }; "prepareItem": { "alias": "prepareItem"; "required": false; }; "checkFn": { "alias": "checkFn"; "required": false; }; }, {}, ["itemTemplate"], never, false, never>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AfterContentInit, AfterViewInit, OnChanges, QueryList, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { DragEventHandler, IPaginationData, ITableColumns, ITableDataQuery, ITableTemplates, TableColumns, TableDataLoader } from "../../common-types";
|
|
3
3
|
import { DynamicTableTemplateDirective } from "../../directives/dynamic-table-template.directive";
|
|
4
4
|
import { PaginationDirective } from "../../directives/pagination.directive";
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -23,9 +23,9 @@ export declare class DynamicTableComponent implements AfterContentInit, AfterVie
|
|
|
23
23
|
orderDescending: boolean;
|
|
24
24
|
testId: string;
|
|
25
25
|
titlePrefix: string;
|
|
26
|
-
dragStartFn:
|
|
27
|
-
dragEnterFn:
|
|
28
|
-
dropFn:
|
|
26
|
+
dragStartFn: DragEventHandler;
|
|
27
|
+
dragEnterFn: DragEventHandler;
|
|
28
|
+
dropFn: DragEventHandler<void>;
|
|
29
29
|
tableId: string;
|
|
30
30
|
templates: ITableTemplates;
|
|
31
31
|
filter: string;
|
|
@@ -57,7 +57,6 @@ export declare class DynamicTableComponent implements AfterContentInit, AfterVie
|
|
|
57
57
|
setOrder(column: string): void;
|
|
58
58
|
updateQuery(c: string, value: string | boolean): void;
|
|
59
59
|
loadData: (page: number, itemsPerPage: number) => Promise<IPaginationData>;
|
|
60
|
-
protected checkTransitions(el: HTMLElement, cb: () => any): void;
|
|
61
60
|
protected loadLocalData(page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string): Promise<IPaginationData>;
|
|
62
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTableComponent, never>;
|
|
63
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "dynamic-table", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "dataLoader": { "alias": "dataLoader"; "required": false; }; "data": { "alias": "data"; "required": false; }; "page": { "alias": "page"; "required": false; }; "urlParam": { "alias": "urlParam"; "required": false; }; "parallelData": { "alias": "parallelData"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "showFilter": { "alias": "showFilter"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "updateTime": { "alias": "updateTime"; "required": false; }; "filterTime": { "alias": "filterTime"; "required": false; }; "maxPages": { "alias": "maxPages"; "required": false; }; "directionLinks": { "alias": "directionLinks"; "required": false; }; "boundaryLinks": { "alias": "boundaryLinks"; "required": false; }; "orderBy": { "alias": "orderBy"; "required": false; }; "orderDescending": { "alias": "orderDescending"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "titlePrefix": { "alias": "titlePrefix"; "required": false; }; "dragStartFn": { "alias": "dragStartFn"; "required": false; }; "dragEnterFn": { "alias": "dragEnterFn"; "required": false; }; "dropFn": { "alias": "dropFn"; "required": false; }; }, {}, ["rowTemplate", "wrapperTemplate", "filterTemplate", "templateDirectives"], never, false, never>;
|
|
@@ -46,12 +46,13 @@ import { ReducePipe } from "./pipes/reduce.pipe";
|
|
|
46
46
|
import { RoundPipe } from "./pipes/round.pipe";
|
|
47
47
|
import { SafeHtmlPipe } from "./pipes/safe-html.pipe";
|
|
48
48
|
import { TranslatePipe } from "./pipes/translate.pipe";
|
|
49
|
+
import { DropListComponent } from "./components/drop-list/drop-list.component";
|
|
49
50
|
import { DynamicTableComponent } from "./components/dynamic-table/dynamic-table.component";
|
|
50
51
|
import { PaginationMenuComponent } from "./components/pagination-menu/pagination-menu.component";
|
|
51
52
|
import { UnorderedListComponent } from "./components/unordered-list/unordered-list.component";
|
|
52
53
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
|
|
53
54
|
export declare const directives: (typeof AsyncMethodBase | typeof BackgroundDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
54
|
-
export declare const components: (typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent)[];
|
|
55
|
+
export declare const components: (typeof DropListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent)[];
|
|
55
56
|
export declare const providers: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | 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 IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof WasmService | typeof DeviceDetectorService | {
|
|
56
57
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
57
58
|
useClass: typeof DragDropEventPlugin;
|
|
@@ -43,11 +43,12 @@ import * as i39 from "./directives/sticky.directive";
|
|
|
43
43
|
import * as i40 from "./directives/sticky-class.directive";
|
|
44
44
|
import * as i41 from "./directives/unordered-list-item.directive";
|
|
45
45
|
import * as i42 from "./directives/unordered-list-template.directive";
|
|
46
|
-
import * as i43 from "./components/
|
|
47
|
-
import * as i44 from "./components/
|
|
48
|
-
import * as i45 from "./components/
|
|
49
|
-
import * as i46 from "
|
|
50
|
-
import * as i47 from "@angular/
|
|
46
|
+
import * as i43 from "./components/drop-list/drop-list.component";
|
|
47
|
+
import * as i44 from "./components/dynamic-table/dynamic-table.component";
|
|
48
|
+
import * as i45 from "./components/pagination-menu/pagination-menu.component";
|
|
49
|
+
import * as i46 from "./components/unordered-list/unordered-list.component";
|
|
50
|
+
import * as i47 from "@angular/common";
|
|
51
|
+
import * as i48 from "@angular/forms";
|
|
51
52
|
export declare function loadBaseUrl(): string;
|
|
52
53
|
export declare function loadBaseHref(baseUrl: string): string;
|
|
53
54
|
export declare class NgxUtilsModule {
|
|
@@ -56,6 +57,6 @@ export declare class NgxUtilsModule {
|
|
|
56
57
|
static provideUtils(config?: IModuleConfig): EnvironmentProviders;
|
|
57
58
|
constructor();
|
|
58
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxUtilsModule, never>;
|
|
59
|
-
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.IsTypePipe, typeof i13.JoinPipe, typeof i14.KeysPipe, typeof i15.MapPipe, typeof i16.MaxPipe, typeof i17.MinPipe, typeof i18.PopPipe, typeof i19.ReducePipe, typeof i20.RemapPipe, typeof i21.ReplacePipe, typeof i22.ReversePipe, typeof i23.RoundPipe, typeof i24.SafeHtmlPipe, typeof i25.ShiftPipe, typeof i26.SplitPipe, typeof i27.TranslatePipe, typeof i28.ValuesPipe, typeof i29.AsyncMethodBase, typeof i30.AsyncMethodDirective, typeof i31.BackgroundDirective, typeof i32.DynamicTableTemplateDirective, typeof i33.GlobalTemplateDirective, typeof i34.IconDirective, typeof i35.NgxTemplateOutletDirective, typeof i36.PaginationDirective, typeof i37.PaginationItemDirective, typeof i38.ResourceIfDirective, typeof i39.StickyDirective, typeof i40.StickyClassDirective, typeof i41.UnorderedListItemDirective, typeof i42.UnorderedListTemplateDirective, typeof i43.
|
|
60
|
+
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.IsTypePipe, typeof i13.JoinPipe, typeof i14.KeysPipe, typeof i15.MapPipe, typeof i16.MaxPipe, typeof i17.MinPipe, typeof i18.PopPipe, typeof i19.ReducePipe, typeof i20.RemapPipe, typeof i21.ReplacePipe, typeof i22.ReversePipe, typeof i23.RoundPipe, typeof i24.SafeHtmlPipe, typeof i25.ShiftPipe, typeof i26.SplitPipe, typeof i27.TranslatePipe, typeof i28.ValuesPipe, typeof i29.AsyncMethodBase, typeof i30.AsyncMethodDirective, typeof i31.BackgroundDirective, typeof i32.DynamicTableTemplateDirective, typeof i33.GlobalTemplateDirective, typeof i34.IconDirective, typeof i35.NgxTemplateOutletDirective, typeof i36.PaginationDirective, typeof i37.PaginationItemDirective, typeof i38.ResourceIfDirective, typeof i39.StickyDirective, typeof i40.StickyClassDirective, typeof i41.UnorderedListItemDirective, typeof i42.UnorderedListTemplateDirective, typeof i43.DropListComponent, typeof i44.DynamicTableComponent, typeof i45.PaginationMenuComponent, typeof i46.UnorderedListComponent], [typeof i47.CommonModule, typeof i48.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.IsTypePipe, typeof i13.JoinPipe, typeof i14.KeysPipe, typeof i15.MapPipe, typeof i16.MaxPipe, typeof i17.MinPipe, typeof i18.PopPipe, typeof i19.ReducePipe, typeof i20.RemapPipe, typeof i21.ReplacePipe, typeof i22.ReversePipe, typeof i23.RoundPipe, typeof i24.SafeHtmlPipe, typeof i25.ShiftPipe, typeof i26.SplitPipe, typeof i27.TranslatePipe, typeof i28.ValuesPipe, typeof i29.AsyncMethodBase, typeof i30.AsyncMethodDirective, typeof i31.BackgroundDirective, typeof i32.DynamicTableTemplateDirective, typeof i33.GlobalTemplateDirective, typeof i34.IconDirective, typeof i35.NgxTemplateOutletDirective, typeof i36.PaginationDirective, typeof i37.PaginationItemDirective, typeof i38.ResourceIfDirective, typeof i39.StickyDirective, typeof i40.StickyClassDirective, typeof i41.UnorderedListItemDirective, typeof i42.UnorderedListTemplateDirective, typeof i43.DropListComponent, typeof i44.DynamicTableComponent, typeof i45.PaginationMenuComponent, typeof i46.UnorderedListComponent, typeof i48.FormsModule]>;
|
|
60
61
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxUtilsModule>;
|
|
61
62
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkTransitions(el: HTMLElement, cb: () => any): void;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TypedFactoryProvider, TypedValueProvider, CachedProvider, CachedFactory, OPTIONS_TOKEN, IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmDialogConfig, IDialogService, DIALOG_SERVICE, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent,
|
|
1
|
+
export { TypedFactoryProvider, TypedValueProvider, CachedProvider, CachedFactory, OPTIONS_TOKEN, IResolveFactory, CanvasColor, IIconService, ICON_SERVICE, ITranslation, ITranslations, ILanguageSetting, ILanguageSettings, ILanguageService, LANGUAGE_SERVICE, IAuthService, RouteValidator, IRouteData, IRoute, AUTH_SERVICE, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmDialogConfig, IDialogService, DIALOG_SERVICE, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, APP_BASE_URL, IConfiguration, IConfigService, CONFIG_SERVICE, BASE_CONFIG, SCRIPT_PARAMS, ROOT_ELEMENT, RESIZE_DELAY, ResizeEventStrategy, RESIZE_STRATEGY, ErrorHandlerCallback, ERROR_HANDLER, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
|
|
2
2
|
export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
|
|
3
3
|
export { ArrayUtils } from "./ngx-utils/utils/array.utils";
|
|
4
4
|
export { AuthGuard } from "./ngx-utils/utils/auth.guard";
|
|
@@ -14,6 +14,7 @@ export { JSONfn } from "./ngx-utils/utils/jsonfn";
|
|
|
14
14
|
export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
|
|
15
15
|
export { LoaderUtils } from "./ngx-utils/utils/loader.utils";
|
|
16
16
|
export { MathUtils } from "./ngx-utils/utils/math.utils";
|
|
17
|
+
export { checkTransitions } from "./ngx-utils/utils/misc";
|
|
17
18
|
export { ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
18
19
|
export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
|
|
19
20
|
export { CancelablePromise, cancelablePromise, impatientPromise } from "./ngx-utils/utils/promise.utils";
|
|
@@ -92,7 +93,8 @@ export { StickyDirective } from "./ngx-utils/directives/sticky.directive";
|
|
|
92
93
|
export { StickyClassDirective } from "./ngx-utils/directives/sticky-class.directive";
|
|
93
94
|
export { UnorderedListItemDirective } from "./ngx-utils/directives/unordered-list-item.directive";
|
|
94
95
|
export { UnorderedListTemplateDirective } from "./ngx-utils/directives/unordered-list-template.directive";
|
|
95
|
-
export {
|
|
96
|
+
export { DropListComponent } from "./ngx-utils/components/drop-list/drop-list.component";
|
|
96
97
|
export { DynamicTableComponent } from "./ngx-utils/components/dynamic-table/dynamic-table.component";
|
|
97
98
|
export { PaginationMenuComponent } from "./ngx-utils/components/pagination-menu/pagination-menu.component";
|
|
99
|
+
export { UnorderedListComponent } from "./ngx-utils/components/unordered-list/unordered-list.component";
|
|
98
100
|
export { NgxUtilsModule } from "./ngx-utils/ngx-utils.module";
|