@stemy/ngx-utils 19.9.24 → 19.9.26

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.
@@ -210,7 +210,7 @@ export interface ButtonProps {
210
210
  tooltip: string;
211
211
  icon: string;
212
212
  disabled: boolean;
213
- path: string;
213
+ path: string | UrlTree;
214
214
  type: ButtonType;
215
215
  size: ButtonSize;
216
216
  }
@@ -262,16 +262,14 @@ export interface IAjaxRequestDetails {
262
262
  }
263
263
  export type AjaxRequestCallback = (details: IAjaxRequestDetails, params: any) => void;
264
264
  export type ScriptType = "text/javascript" | "module";
265
- export interface ILoadableElement extends HTMLElement {
265
+ export interface LoadableElement extends HTMLElement {
266
266
  readyState?: string;
267
267
  onreadystatechange?: Function;
268
268
  }
269
- export interface ILoaderPromises<T extends ILoadableElement> {
270
- [src: string]: {
271
- elem: T;
272
- promise: Promise<T>;
273
- };
274
- }
269
+ export type LoaderPromises<T extends LoadableElement> = Record<string, {
270
+ elem: T;
271
+ promise: Promise<T>;
272
+ }>;
275
273
  export interface ISearchObservable {
276
274
  search: string;
277
275
  getSearchResults(token: string): Promise<any[]>;
@@ -1,4 +1,5 @@
1
1
  import { ElementRef } from "@angular/core";
2
+ import { UrlTree } from "@angular/router";
2
3
  import { ButtonProps, ButtonSize, ButtonType } from "../../common-types";
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class BtnComponent {
@@ -6,14 +7,13 @@ export declare class BtnComponent {
6
7
  readonly tooltip: import("@angular/core").InputSignal<string>;
7
8
  readonly icon: import("@angular/core").InputSignal<string>;
8
9
  readonly disabled: import("@angular/core").InputSignal<boolean>;
9
- readonly path: import("@angular/core").InputSignal<string>;
10
+ readonly path: import("@angular/core").InputSignal<string | UrlTree>;
10
11
  readonly type: import("@angular/core").InputSignal<ButtonType>;
11
12
  readonly size: import("@angular/core").InputSignal<ButtonSize>;
12
13
  readonly buttonType: import("@angular/core").Type<ButtonProps>;
13
14
  readonly element: ElementRef<HTMLElement>;
14
15
  readonly buttonProps: import("@angular/core").Signal<ButtonProps>;
15
16
  contains(target: EventTarget): boolean;
16
- onBtnClick(event: MouseEvent): void;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<BtnComponent, never>;
18
18
  static ɵcmp: i0.ɵɵComponentDeclaration<BtnComponent, "btn", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "path": { "alias": "path"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
19
19
  }
@@ -1,16 +1,14 @@
1
1
  import { TemplateRef } from "@angular/core";
2
- import { Router, UrlSerializer } from "@angular/router";
2
+ import { Router } from "@angular/router";
3
3
  import { AsyncMethod, ButtonSize, ButtonType, TabOption, TabValue } from "../../common-types";
4
4
  import { TabsItemDirective } from "../../directives/tabs-item.directive";
5
5
  import * as i0 from "@angular/core";
6
- export interface ExtendedTabOption extends Omit<TabOption, "path"> {
6
+ export interface ExtendedTabOption extends TabOption {
7
7
  active?: boolean;
8
8
  template?: TemplateRef<any>;
9
9
  className?: string;
10
- path?: string;
11
10
  }
12
11
  export declare class TabsComponent {
13
- readonly urlSerializer: UrlSerializer;
14
12
  readonly router: Router;
15
13
  readonly value: import("@angular/core").ModelSignal<TabValue>;
16
14
  readonly options: import("@angular/core").InputSignal<TabOption[]>;
@@ -12,6 +12,7 @@ import { ErrorHandlerService } from "./services/error-handler.service";
12
12
  import { EventsService } from "./services/events.service";
13
13
  import { FormatterService } from "./services/formatter.service";
14
14
  import { GlobalTemplateService } from "./services/global-template.service";
15
+ import { HrefSerializer } from "./services/href-serializer";
15
16
  import { IconService } from "./services/icon.service";
16
17
  import { PromiseService } from "./services/promise.service";
17
18
  import { SocketService } from "./services/socket.service";
@@ -67,7 +68,7 @@ import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
67
68
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
68
69
  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)[];
69
70
  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 StateService | typeof AuthGuard | typeof EventsService | typeof AclService | typeof BaseHttpClient | typeof StorageService | typeof CacheService | typeof BaseHttpService | typeof StaticAuthService | typeof ConfigService | typeof BaseDialogService | typeof ErrorHandlerService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof PromiseService | typeof SocketService | typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe | typeof DeviceDetectorService | {
71
+ 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 | {
71
72
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
72
73
  useClass: typeof DragDropEventPlugin;
73
74
  multi: boolean;
@@ -0,0 +1,15 @@
1
+ import { EventEmitter } from "@angular/core";
2
+ import { UrlSerializer, UrlTree } from "@angular/router";
3
+ import * as i0 from "@angular/core";
4
+ export declare class HrefSerializer {
5
+ readonly baseHref: string;
6
+ readonly urlSerializer: UrlSerializer;
7
+ get count(): number;
8
+ get onChanged(): EventEmitter<number>;
9
+ protected promiseCount: number;
10
+ protected readonly promiseChanged: EventEmitter<number>;
11
+ constructor(baseHref: string, urlSerializer: UrlSerializer);
12
+ serialize(url: UrlTree | string): string;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HrefSerializer, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<HrefSerializer>;
15
+ }
@@ -1,8 +1,8 @@
1
1
  import { ScriptType } from "../common-types";
2
2
  export declare class LoaderUtils {
3
3
  private static promises;
4
- static loadScript(src: string, async?: boolean, type?: ScriptType, parent?: Node, time?: boolean | string): Promise<HTMLScriptElement>;
5
- static loadStyle(src: string, parent?: Node, time?: boolean | string): Promise<HTMLLinkElement>;
4
+ static loadScript(src: string | URL, async?: boolean, type?: ScriptType, parent?: Node, time?: boolean | string): Promise<HTMLScriptElement>;
5
+ static loadStyle(src: string | URL, parent?: Node, time?: boolean | string): Promise<HTMLLinkElement>;
6
6
  private static updateSrc;
7
7
  private static loadElement;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.9.24",
3
+ "version": "19.9.26",
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,6 +1,6 @@
1
1
  import "zone.js";
2
2
  export { MaybePromise, MaybeArray, KeysOfType, ObjOfType, StringKeys, CapitalizeFirst, CamelJoin, PrefixedPick, RequireAtLeastOne } from "./ngx-utils/helper-types";
3
- export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, ResolveFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, GlobalTranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, MenuItem, IAclComponent, IAclService, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, ShapeIntersection, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, InteractiveCanvasParams, InteractiveCanvasArea, InteractiveCanvasItem, InteractiveCanvasItems, InteractiveCanvas, InteractiveCanvasRenderer, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, SvgSourceModifier, IBaseHttpClient, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, OpenApiSchemaSelector, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataItems, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
3
+ export { DurationUnit, TypedFactoryProvider, TypedValueProvider, TypedExistingProvider, TypedClassProvider, TypedTokenProvider, TypedProvider, CachedFactory, ResolveFactory, IResolveFactory, CanvasColor, IIconService, ITranslation, ITranslations, GlobalTranslations, ILanguageSetting, ILanguageSettings, ILanguageService, IUserData, IAuthService, RouteValidator, IRouteData, IRoute, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, MenuItem, IAclComponent, IAclService, NavigationUrlParam, StorageMode, ToastType, IToasterService, IAsyncMessage, AsyncMethod, IconMap, IconProps, ButtonType, ButtonSize, ButtonProps, TabValue, TabOption, ChipValue, ChipStatus, ChipOption, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, LoadableElement, LoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, ShapeIntersection, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, InteractiveCanvasParams, InteractiveCanvasArea, InteractiveCanvasItem, InteractiveCanvasItems, InteractiveCanvas, InteractiveCanvasRenderer, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, SvgSourceModifier, IBaseHttpClient, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, OpenApiSchemaSelector, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataItems, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, IConfiguration, IConfigService, ResizeEventStrategy, ErrorHandlerCallback, GlobalComponentModifier, AppInitializerFunc, IModuleConfig, ValuedPromise } from "./ngx-utils/common-types";
4
4
  export { ICON_TYPE, ICON_MAP, BUTTON_TYPE, ERROR_HANDLER, STATIC_SCHEMAS, SCHEMA_SELECTOR, RESIZE_STRATEGY, RESIZE_DELAY, ROOT_ELEMENT, SCRIPT_PARAMS, BASE_CONFIG, CONFIG_SERVICE, APP_BASE_URL, API_SERVICE, EXPRESS_REQUEST, PROMISE_SERVICE, DIALOG_SERVICE, TOASTER_SERVICE, AUTH_SERVICE, LANGUAGE_SERVICE, ICON_SERVICE, OPTIONS_TOKEN } from "./ngx-utils/tokens";
5
5
  export { AjaxRequestHandler } from "./ngx-utils/utils/ajax-request-handler";
6
6
  export { ArrayUtils } from "./ngx-utils/utils/array.utils";
@@ -45,6 +45,7 @@ export { ErrorHandlerService } from "./ngx-utils/services/error-handler.service"
45
45
  export { EventsService } from "./ngx-utils/services/events.service";
46
46
  export { FormatterService } from "./ngx-utils/services/formatter.service";
47
47
  export { GlobalTemplateService } from "./ngx-utils/services/global-template.service";
48
+ export { HrefSerializer } from "./ngx-utils/services/href-serializer";
48
49
  export { IconService } from "./ngx-utils/services/icon.service";
49
50
  export { LanguageService } from "./ngx-utils/services/language.service";
50
51
  export { LocalHttpService } from "./ngx-utils/services/local-http.service";