@stemy/ngx-utils 19.9.15 → 19.9.16
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 +48 -26
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +6 -2
- package/ngx-utils/components/dynamic-table/dynamic-table.component.d.ts +2 -2
- package/ngx-utils/directives/pagination.directive.d.ts +5 -4
- package/ngx-utils/ngx-utils.imports.d.ts +2 -2
- package/ngx-utils/utils/promise.utils.d.ts +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -301,7 +301,7 @@ export interface IPaginationData {
|
|
|
301
301
|
items: any[];
|
|
302
302
|
meta?: any;
|
|
303
303
|
}
|
|
304
|
-
export type PaginationDataLoader = (page: number, itemsPerPage: number) => Promise<IPaginationData>;
|
|
304
|
+
export type PaginationDataLoader = (page: number, itemsPerPage: number, controller: AbortController) => Promise<IPaginationData>;
|
|
305
305
|
export declare class PaginationItemContext {
|
|
306
306
|
readonly item: any;
|
|
307
307
|
readonly parallelItem: any;
|
|
@@ -464,6 +464,10 @@ export interface HttpRequestOptions extends HttpClientRequestOptions {
|
|
|
464
464
|
* Specifies when the cache for the request expires as an Observable
|
|
465
465
|
*/
|
|
466
466
|
cache?: Observable<any>;
|
|
467
|
+
/**
|
|
468
|
+
* Specifies an abort controller to make the request abortable
|
|
469
|
+
*/
|
|
470
|
+
controller?: AbortController;
|
|
467
471
|
}
|
|
468
472
|
/**
|
|
469
473
|
* Defines the type of uploadable content
|
|
@@ -577,7 +581,7 @@ export interface ITableDataQuery {
|
|
|
577
581
|
[column: string]: string | string[] | boolean;
|
|
578
582
|
}
|
|
579
583
|
export type TableDataItems = ReadonlyArray<any>;
|
|
580
|
-
export type TableDataLoader = (page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string, query: ITableDataQuery) => Promise<IPaginationData>;
|
|
584
|
+
export type TableDataLoader = (page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string, query: ITableDataQuery, controller: AbortController) => Promise<IPaginationData>;
|
|
581
585
|
export type DragDropEvent<K extends string = "item", T = any> = {
|
|
582
586
|
[key in K]: T;
|
|
583
587
|
} & {
|
|
@@ -80,9 +80,9 @@ export declare class DynamicTableComponent implements AfterViewInit, OnChanges,
|
|
|
80
80
|
refresh(time?: number): void;
|
|
81
81
|
setFilter(filter: string): void;
|
|
82
82
|
setSorting(column: string, toggle?: DropdownDirective): void;
|
|
83
|
-
setQueryValue(c: string, value
|
|
83
|
+
setQueryValue(c: string, value?: string | boolean): void;
|
|
84
84
|
setItemsPerPage(count: number): void;
|
|
85
|
-
loadData: (page: number, itemsPerPage: number) => Promise<IPaginationData>;
|
|
85
|
+
loadData: (page: number, itemsPerPage: number, controller: AbortController) => Promise<IPaginationData>;
|
|
86
86
|
protected loadLocalData(page: number, rowsPerPage: number, orderBy: string, orderDescending: boolean, filter: string, query: ITableDataQuery): Promise<IPaginationData>;
|
|
87
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTableComponent, never>;
|
|
88
88
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "dynamic-table", never, { "dataLoader": { "alias": "dataLoader"; "required": false; }; "data": { "alias": "data"; "required": false; }; "selected": { "alias": "selected"; "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; }; "filterLabel": { "alias": "filterLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showItems": { "alias": "showItems"; "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; }; "globalTemplatePrefix": { "alias": "globalTemplatePrefix"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, ["fallbackTemplate", "templateDirectives", "rowTemplate", "wrapperTemplate"], ["[table-features-before]", "[table-features-after]", "[table-top]", "[table-bottom]"], false, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, NgZone, OnChanges, Renderer2, SimpleChanges } from "@angular/core";
|
|
2
|
-
import { PaginationDataLoader } from "../common-types";
|
|
2
|
+
import { IPaginationData, ITimer, PaginationDataLoader } from "../common-types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class PaginationDirective implements OnChanges {
|
|
5
5
|
readonly zone: NgZone;
|
|
@@ -15,12 +15,13 @@ export declare class PaginationDirective implements OnChanges {
|
|
|
15
15
|
pageChange: EventEmitter<number>;
|
|
16
16
|
onRefresh: EventEmitter<PaginationDirective>;
|
|
17
17
|
maxPage: number;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
protected data: IPaginationData;
|
|
19
|
+
protected updateTimer: ITimer;
|
|
20
|
+
protected controller: AbortController;
|
|
20
21
|
constructor(zone: NgZone, renderer: Renderer2, element: ElementRef);
|
|
21
22
|
ngOnChanges(changes: SimpleChanges): void;
|
|
22
23
|
refresh(time?: number): void;
|
|
23
|
-
paginate(page: number): void;
|
|
24
|
+
paginate(page: number, time?: number): void;
|
|
24
25
|
private loadData;
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationDirective, never>;
|
|
26
27
|
static ɵdir: i0.ɵɵDirectiveDeclaration<PaginationDirective, "[pagination]", ["pagination"], { "loader": { "alias": "pagination"; "required": false; }; "page": { "alias": "page"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "updateTime": { "alias": "updateTime"; "required": false; }; "waitFor": { "alias": "waitFor"; "required": false; }; }, { "pageChange": "pageChange"; "onRefresh": "onRefresh"; }, never, never, false, never>;
|
|
@@ -65,9 +65,9 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
|
|
|
65
65
|
import { UploadComponent } from "./components/upload/upload.component";
|
|
66
66
|
import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
|
|
67
67
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
|
|
68
|
-
export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof
|
|
68
|
+
export declare const directives: (typeof TabsItemDirective | typeof DynamicTableTemplateDirective | typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownDirective | typeof DropdownContentDirective | typeof DropdownToggleDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
69
69
|
export declare const components: (typeof ChipsComponent | typeof CloseBtnComponent | typeof DropListComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent | typeof WysiwygComponent)[];
|
|
70
|
-
export declare const providers: (typeof UniversalService | typeof
|
|
70
|
+
export declare const providers: (typeof UniversalService | typeof GlobalTemplateService | 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 IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof CacheService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof DeviceDetectorService | {
|
|
71
71
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
72
72
|
useClass: typeof DragDropEventPlugin;
|
|
73
73
|
multi: boolean;
|
|
@@ -3,3 +3,4 @@ export interface CancelablePromise<T> extends Promise<T> {
|
|
|
3
3
|
}
|
|
4
4
|
export declare function cancelablePromise<T>(source: Promise<T>): CancelablePromise<T>;
|
|
5
5
|
export declare function impatientPromise<T>(factory: () => Promise<T>): () => Promise<T>;
|
|
6
|
+
export declare function promiseTimeout(time?: number): Promise<void>;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { EPSILON, normalizeRange, clamp, overflow, isEqual, isZero, MathUtils }
|
|
|
25
25
|
export { isBrowser, getRoot, switchClass, getCssVariables, checkTransitions, getComponentDef, parseSelector, selectorMatchesList, provideEntryComponents, provideOptions, provideWithOptions, injectOptions, DiffEntityResult, diffEntities } from "./ngx-utils/utils/misc";
|
|
26
26
|
export { ObjectUtils } from "./ngx-utils/utils/object.utils";
|
|
27
27
|
export { ObservableUtils, ISubscriberInfo } from "./ngx-utils/utils/observable.utils";
|
|
28
|
-
export { CancelablePromise, cancelablePromise, impatientPromise } from "./ngx-utils/utils/promise.utils";
|
|
28
|
+
export { CancelablePromise, cancelablePromise, impatientPromise, promiseTimeout } from "./ngx-utils/utils/promise.utils";
|
|
29
29
|
export { svgToDataUri, StringUtils } from "./ngx-utils/utils/string.utils";
|
|
30
30
|
export { SetUtils } from "./ngx-utils/utils/set.utils";
|
|
31
31
|
export { computedPrevious, cssStyles, cssVariables } from "./ngx-utils/utils/signal-utils";
|