@stemy/ngx-utils 17.3.0 → 17.3.2
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/esm2022/ngx-utils/common-types.mjs +1 -1
- package/esm2022/ngx-utils/components/dropdown-box/dropdown-box.component.mjs +5 -5
- package/esm2022/ngx-utils/components/dynamic-table/dynamic-table.component.mjs +1 -1
- package/esm2022/ngx-utils/directives/async-method.base.mjs +5 -6
- package/esm2022/ngx-utils/directives/dropdown-content.directive.mjs +68 -26
- package/esm2022/ngx-utils/directives/dropdown.directive.mjs +4 -4
- package/esm2022/ngx-utils/ngx-utils.module.mjs +5 -2
- package/esm2022/public_api.mjs +1 -1
- package/fesm2022/stemy-ngx-utils.mjs +83 -39
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +2 -1
- package/ngx-utils/components/dropdown-box/dropdown-box.component.d.ts +4 -3
- package/ngx-utils/directives/async-method.base.d.ts +1 -1
- package/ngx-utils/directives/dropdown-content.directive.d.ts +4 -1
- package/ngx-utils/directives/dropdown.directive.d.ts +4 -3
- package/ngx-utils/ngx-utils.imports.d.ts +1 -1
- package/ngx-utils/ngx-utils.module.d.ts +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, InjectionToken, Injector, NgZone, Provider, TemplateRef, Type } from "@angular/core";
|
|
1
|
+
import { ElementRef, EventEmitter, InjectionToken, Injector, NgZone, Provider, TemplateRef, Type } from "@angular/core";
|
|
2
2
|
import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http";
|
|
3
3
|
import { ActivatedRouteSnapshot, Data, Route, UrlTree } from "@angular/router";
|
|
4
4
|
import { Request } from "express";
|
|
@@ -145,6 +145,7 @@ export interface IAsyncMessage {
|
|
|
145
145
|
context?: any;
|
|
146
146
|
}
|
|
147
147
|
export type AsyncMethod = (context?: any) => Promise<IAsyncMessage>;
|
|
148
|
+
export type DropdownAttachTo = "root" | HTMLElement | ElementRef<HTMLElement> | null;
|
|
148
149
|
export interface UnorderedListTemplate {
|
|
149
150
|
readonly type: string;
|
|
150
151
|
readonly selector: string;
|
|
@@ -2,6 +2,7 @@ import { AfterViewInit, OnChanges } from "@angular/core";
|
|
|
2
2
|
import { Placement } from "@floating-ui/utils";
|
|
3
3
|
import { Alignment, AutoPlacementOptions } from "@floating-ui/dom";
|
|
4
4
|
import { DropdownContentDirective } from "../../directives/dropdown-content.directive";
|
|
5
|
+
import { DropdownAttachTo } from "../../common-types";
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class DropdownBoxComponent implements AfterViewInit, OnChanges {
|
|
7
8
|
/**
|
|
@@ -9,9 +10,9 @@ export declare class DropdownBoxComponent implements AfterViewInit, OnChanges {
|
|
|
9
10
|
*/
|
|
10
11
|
closeInside: boolean;
|
|
11
12
|
/**
|
|
12
|
-
* Determines
|
|
13
|
+
* Determines where the floating element needs to be placed
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
attachTo: DropdownAttachTo;
|
|
15
16
|
/**
|
|
16
17
|
* Where to place the floating element relative to the reference element.
|
|
17
18
|
*/
|
|
@@ -51,5 +52,5 @@ export declare class DropdownBoxComponent implements AfterViewInit, OnChanges {
|
|
|
51
52
|
ngAfterViewInit(): void;
|
|
52
53
|
ngOnChanges(): void;
|
|
53
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownBoxComponent, never>;
|
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownBoxComponent, "dropdown-box", never, { "closeInside": { "alias": "closeInside"; "required": false; }; "
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownBoxComponent, "dropdown-box", never, { "closeInside": { "alias": "closeInside"; "required": false; }; "attachTo": { "alias": "attachTo"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "crossAxis": { "alias": "crossAxis"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "autoAlignment": { "alias": "autoAlignment"; "required": false; }; "allowedPlacements": { "alias": "allowedPlacements"; "required": false; }; "componentClass": { "alias": "componentClass"; "required": false; }; }, {}, never, ["[toggle-content]", "*"], false, never>;
|
|
55
56
|
}
|
|
@@ -14,7 +14,7 @@ export declare class AsyncMethodBase implements OnChanges {
|
|
|
14
14
|
constructor(toaster: IToasterService, cdr: ChangeDetectorRef);
|
|
15
15
|
protected getMethod(): AsyncMethod;
|
|
16
16
|
ngOnChanges(): void;
|
|
17
|
-
click(ev: Event):
|
|
17
|
+
click(ev: Event): boolean;
|
|
18
18
|
callMethod(): boolean;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncMethodBase, never>;
|
|
20
20
|
static ɵdir: i0.ɵɵDirectiveDeclaration<AsyncMethodBase, "[__asmb__]", never, { "disabled": { "alias": "disabled"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; }, never, never, false, never>;
|
|
@@ -8,6 +8,8 @@ export declare class DropdownContentDirective implements OnInit, OnDestroy {
|
|
|
8
8
|
protected dropdown: DropdownDirective;
|
|
9
9
|
readonly templateRef: TemplateRef<any>;
|
|
10
10
|
protected subscription: Subscription;
|
|
11
|
+
protected attachTo: HTMLElement;
|
|
12
|
+
protected attachOutside: boolean;
|
|
11
13
|
protected lastPlacement: string;
|
|
12
14
|
protected cleanUp: () => void;
|
|
13
15
|
constructor(vcr: ViewContainerRef, rootElem: HTMLElement, dropdown: DropdownDirective, templateRef: TemplateRef<any>);
|
|
@@ -15,7 +17,8 @@ export declare class DropdownContentDirective implements OnInit, OnDestroy {
|
|
|
15
17
|
ngOnDestroy(): void;
|
|
16
18
|
protected createView(init?: boolean): void;
|
|
17
19
|
protected destroyView(): void;
|
|
18
|
-
protected
|
|
20
|
+
protected whereToAttach(): HTMLElement;
|
|
21
|
+
protected createWrapper(): HTMLDivElement[];
|
|
19
22
|
initialize(): void;
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownContentDirective, [null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
21
24
|
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownContentDirective, "[dropdownContent]", ["dropdown-content"], {}, {}, never, never, false, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnDestroy } from "@angular/core";
|
|
2
2
|
import { AutoPlacementOptions, Placement } from "@floating-ui/dom";
|
|
3
|
+
import { DropdownAttachTo } from "../common-types";
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class DropdownDirective implements OnDestroy {
|
|
5
6
|
protected element: ElementRef<HTMLElement>;
|
|
@@ -11,9 +12,9 @@ export declare class DropdownDirective implements OnDestroy {
|
|
|
11
12
|
*/
|
|
12
13
|
closeInside: boolean;
|
|
13
14
|
/**
|
|
14
|
-
* Determines
|
|
15
|
+
* Determines where the floating element needs to be placed
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
attachTo: DropdownAttachTo;
|
|
17
18
|
/**
|
|
18
19
|
* Where to place the floating element relative to the reference element.
|
|
19
20
|
*/
|
|
@@ -52,5 +53,5 @@ export declare class DropdownDirective implements OnDestroy {
|
|
|
52
53
|
show($event?: Event): boolean;
|
|
53
54
|
hide(): boolean;
|
|
54
55
|
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownDirective, never>;
|
|
55
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownDirective, "[dd],[drop-down]", ["dropdown"], { "closeInside": { "alias": "closeInside"; "required": false; }; "
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DropdownDirective, "[dd],[drop-down]", ["dropdown"], { "closeInside": { "alias": "closeInside"; "required": false; }; "attachTo": { "alias": "attachTo"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "autoPlacement": { "alias": "autoPlacement"; "required": false; }; "mobileViewUnder": { "alias": "mobileViewUnder"; "required": false; }; "keyboardHandler": { "alias": "keyboardHandler"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; }, { "onShown": "onShown"; "onHidden": "onHidden"; "onKeyboard": "onKeyboard"; }, never, never, false, never>;
|
|
56
57
|
}
|
|
@@ -53,7 +53,7 @@ import { DynamicTableComponent } from "./components/dynamic-table/dynamic-table.
|
|
|
53
53
|
import { PaginationMenuComponent } from "./components/pagination-menu/pagination-menu.component";
|
|
54
54
|
import { UnorderedListComponent } from "./components/unordered-list/unordered-list.component";
|
|
55
55
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
|
|
56
|
-
export declare const directives: (typeof
|
|
56
|
+
export declare const directives: (typeof DropdownContentDirective | typeof AsyncMethodBase | typeof BackgroundDirective | typeof DropdownDirective | typeof DropdownToggleDirective | typeof DynamicTableTemplateDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
57
57
|
export declare const components: (typeof DropdownBoxComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent)[];
|
|
58
58
|
export declare const providers: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof BaseHttpClient | typeof BaseHttpService | typeof AuthGuard | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof StateService | typeof StorageService | typeof ConsoleToasterService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof WasmService | typeof DeviceDetectorService | {
|
|
59
59
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
@@ -55,6 +55,7 @@ import * as i51 from "@angular/common";
|
|
|
55
55
|
import * as i52 from "@angular/forms";
|
|
56
56
|
export declare function loadBaseUrl(): string;
|
|
57
57
|
export declare function loadBaseHref(baseUrl: string): string;
|
|
58
|
+
export declare function getRootElement(): HTMLElement;
|
|
58
59
|
export declare class NgxUtilsModule {
|
|
59
60
|
private static getProviders;
|
|
60
61
|
static forRoot(config?: IModuleConfig): ModuleWithProviders<NgxUtilsModule>;
|
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, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, 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, 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";
|
|
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, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, DropdownAttachTo, 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, 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";
|