@stemy/ngx-utils 17.3.0 → 17.3.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.
@@ -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 if the floating element needs to be placed in the root node or keep where it was before
13
+ * Determines where the floating element needs to be placed
13
14
  */
14
- attachToRoot: boolean;
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; }; "attachToRoot": { "alias": "attachToRoot"; "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
+ 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): void;
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 createWrapper(): HTMLDivElement;
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 if the floating element needs to be placed in the root node or keep where it was before
15
+ * Determines where the floating element needs to be placed
15
16
  */
16
- attachToRoot: boolean;
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; }; "attachToRoot": { "alias": "attachToRoot"; "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
+ 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
  }
@@ -54,8 +54,8 @@ import { PaginationMenuComponent } from "./components/pagination-menu/pagination
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
56
  export declare const directives: (typeof AsyncMethodBase | typeof BackgroundDirective | typeof DropdownDirective | typeof DropdownContentDirective | 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
- export declare const components: (typeof DropdownBoxComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent)[];
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 | {
57
+ export declare const components: (typeof UnorderedListComponent | typeof DropdownBoxComponent | typeof DynamicTableComponent | typeof PaginationMenuComponent)[];
58
+ export declare const providers: (typeof UniversalService | typeof StateService | typeof AuthGuard | typeof BaseHttpClient | typeof StorageService | typeof BaseHttpService | typeof WasmService | typeof AclService | typeof StaticAuthService | typeof ConfigService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof ConsoleToasterService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
59
59
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
60
60
  useClass: typeof ResizeEventPlugin;
61
61
  multi: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "17.3.0",
3
+ "version": "17.3.1",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
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";