@stemy/ngx-utils 19.7.30 → 19.8.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 +41 -20
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +2 -0
- package/ngx-utils/directives/async-method.base.d.ts +7 -5
- package/ngx-utils/ngx-utils.imports.d.ts +5 -3
- package/ngx-utils/services/open-api.service.d.ts +5 -2
- package/ngx-utils/tokens.d.ts +2 -1
- package/package.json +1 -1
- package/public_api.d.ts +2 -2
|
@@ -534,6 +534,7 @@ export interface OpenApiSchema {
|
|
|
534
534
|
export interface OpenApiSchemas {
|
|
535
535
|
[name: string]: OpenApiSchema;
|
|
536
536
|
}
|
|
537
|
+
export type OpenApiSchemaSelector = (name: string, schemas: OpenApiSchemas, injector: Injector) => OpenApiSchema;
|
|
537
538
|
export type TableFilterType = "text" | "enum" | "checkbox";
|
|
538
539
|
export interface ITableOrders {
|
|
539
540
|
[column: string]: string;
|
|
@@ -635,6 +636,7 @@ export interface IModuleConfig {
|
|
|
635
636
|
resizeStrategy?: ResizeEventStrategy;
|
|
636
637
|
socketPath?: string;
|
|
637
638
|
staticSchemas?: OpenApiSchemas;
|
|
639
|
+
schemaSelector?: OpenApiSchemaSelector;
|
|
638
640
|
}
|
|
639
641
|
export declare class ValuedPromise<T> extends Promise<T> {
|
|
640
642
|
value: T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, ElementRef, OnChanges } from "@angular/core";
|
|
2
2
|
import { AsyncMethod, IAsyncMessage } from "../common-types";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AsyncMethodBase implements OnChanges {
|
|
4
|
+
export declare class AsyncMethodBase<T extends AsyncMethod = AsyncMethod> implements OnChanges {
|
|
5
5
|
readonly disabled: import("@angular/core").WritableSignal<boolean>;
|
|
6
6
|
readonly context: import("@angular/core").InputSignal<any>;
|
|
7
7
|
readonly onSuccess: import("@angular/core").OutputEmitterRef<IAsyncMessage>;
|
|
@@ -13,10 +13,12 @@ export declare class AsyncMethodBase implements OnChanges {
|
|
|
13
13
|
readonly target: import("@angular/core").WritableSignal<HTMLElement>;
|
|
14
14
|
readonly previousTarget: import("@angular/core").Signal<HTMLElement>;
|
|
15
15
|
constructor();
|
|
16
|
-
protected getMethod(): AsyncMethod;
|
|
17
16
|
ngOnChanges(): void;
|
|
18
|
-
|
|
17
|
+
onClick(ev: MouseEvent): boolean;
|
|
19
18
|
callMethod(ev?: MouseEvent): boolean;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
protected handleClick(ev: MouseEvent): boolean;
|
|
20
|
+
protected getMethod(): T;
|
|
21
|
+
protected getArgs(ev: MouseEvent): unknown[];
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsyncMethodBase<any>, never>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AsyncMethodBase<any>, "[__asmb__]", never, { "context": { "alias": "context"; "required": false; "isSignal": true; }; }, { "onSuccess": "onSuccess"; "onError": "onError"; }, never, never, false, never>;
|
|
22
24
|
}
|
|
@@ -28,6 +28,7 @@ import { DragDropEventPlugin } from "./plugins/drag-drop-event.plugin";
|
|
|
28
28
|
import { ResizeEventPlugin } from "./plugins/resize-event.plugin";
|
|
29
29
|
import { ScrollEventPlugin } from "./plugins/scroll-event.plugin";
|
|
30
30
|
import { AsyncMethodBase } from "./directives/async-method.base";
|
|
31
|
+
import { AsyncMethodDirective } from "./directives/async-method.directive";
|
|
31
32
|
import { AsyncMethodTargetDirective } from "./directives/async-method-target.directive";
|
|
32
33
|
import { BackgroundDirective } from "./directives/background.directive";
|
|
33
34
|
import { ComponentLoaderDirective } from "./directives/component-loader.directive";
|
|
@@ -42,6 +43,7 @@ import { StickyDirective } from "./directives/sticky.directive";
|
|
|
42
43
|
import { StickyClassDirective } from "./directives/sticky-class.directive";
|
|
43
44
|
import { DropdownDirective } from "./directives/dropdown.directive";
|
|
44
45
|
import { DropdownContentDirective } from "./directives/dropdown-content.directive";
|
|
46
|
+
import { DropdownToggleDirective } from "./directives/dropdown-toggle.directive";
|
|
45
47
|
import { TabsItemDirective } from "./directives/tabs-item.directive";
|
|
46
48
|
import { UnorderedListItemDirective } from "./directives/unordered-list-item.directive";
|
|
47
49
|
import { UnorderedListTemplateDirective } from "./directives/unordered-list-template.directive";
|
|
@@ -63,9 +65,9 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
|
|
|
63
65
|
import { UploadComponent } from "./components/upload/upload.component";
|
|
64
66
|
import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
|
|
65
67
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
|
|
66
|
-
export declare const directives: (typeof AsyncMethodBase | 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
|
|
67
|
-
export declare const components: (typeof
|
|
68
|
-
export declare const providers: (typeof
|
|
68
|
+
export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof DropdownDirective | typeof DropdownToggleDirective | 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 DropdownContentDirective | typeof TabsItemDirective | typeof UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
|
|
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 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 | {
|
|
69
71
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
70
72
|
useClass: typeof DragDropEventPlugin;
|
|
71
73
|
multi: boolean;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injector } from "@angular/core";
|
|
2
|
+
import { DynamicSchemaRef, IApiService, OpenApiSchema, OpenApiSchemaProperty, OpenApiSchemas, OpenApiSchemaSelector } from "../common-types";
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class OpenApiService {
|
|
4
5
|
readonly api: IApiService;
|
|
6
|
+
protected readonly schemaSelector: OpenApiSchemaSelector;
|
|
5
7
|
protected readonly staticSchemas: OpenApiSchemas;
|
|
8
|
+
protected readonly injector: Injector;
|
|
6
9
|
private apiDocs;
|
|
7
10
|
private schemas;
|
|
8
11
|
private readonly dynamicSchemas;
|
|
9
|
-
constructor(api: IApiService, staticSchemas: OpenApiSchemas);
|
|
12
|
+
constructor(api: IApiService, schemaSelector: OpenApiSchemaSelector, staticSchemas: OpenApiSchemas, injector: Injector);
|
|
10
13
|
isDynamicSchema(value: any): value is Required<DynamicSchemaRef>;
|
|
11
14
|
getSchemas(): Promise<OpenApiSchemas>;
|
|
12
15
|
getReferences(property: OpenApiSchemaProperty, schema: OpenApiSchema): Promise<OpenApiSchema[]>;
|
package/ngx-utils/tokens.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken, Type } from "@angular/core";
|
|
2
2
|
import { Request } from "express";
|
|
3
|
-
import { ButtonProps, DynamicEntryComponents, DynamicModuleInfo, ErrorHandlerCallback, IApiService, IAuthService, IConfigService, IConfiguration, IconMap, IconProps, IDialogService, IIconService, ILanguageService, IPromiseService, IToasterService, OpenApiSchemas, ResizeEventStrategy } from "./common-types";
|
|
3
|
+
import { ButtonProps, DynamicEntryComponents, DynamicModuleInfo, ErrorHandlerCallback, IApiService, IAuthService, IConfigService, IConfiguration, IconMap, IconProps, IDialogService, IIconService, ILanguageService, IPromiseService, IToasterService, OpenApiSchemas, OpenApiSchemaSelector, ResizeEventStrategy } from "./common-types";
|
|
4
4
|
export declare const ICON_TYPE: InjectionToken<Type<IconProps>>;
|
|
5
5
|
export declare const ICON_MAP: InjectionToken<IconMap>;
|
|
6
6
|
export declare const BUTTON_TYPE: InjectionToken<Type<ButtonProps>>;
|
|
@@ -25,3 +25,4 @@ export declare const RESIZE_DELAY: InjectionToken<number>;
|
|
|
25
25
|
export declare const RESIZE_STRATEGY: InjectionToken<ResizeEventStrategy>;
|
|
26
26
|
export declare const ERROR_HANDLER: InjectionToken<ErrorHandlerCallback>;
|
|
27
27
|
export declare const STATIC_SCHEMAS: InjectionToken<OpenApiSchemas>;
|
|
28
|
+
export declare const SCHEMA_SELECTOR: InjectionToken<OpenApiSchemaSelector>;
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "zone.js";
|
|
2
2
|
export { MaybePromise, MaybeArray, KeysOfType, ObjOfType, StringKeys, CapitalizeFirst, CamelJoin, PrefixedPick } 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, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, 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, ShapeDistance, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, Frame, InteractiveCanvasParams, InteractiveCanvasItem, InteractiveCanvasItems, InteractiveCanvas, InteractiveCanvasRenderer, InteractivePanEvent, InteractiveCanvasPointer, HttpRequestHeaders, HttpRequestQuery, HttpClientRequestOptions, HttpRequestOptions, UploadData, IIssueContext, IProgress, ProgressListener, CacheExpireMode, IHttpService, SvgSourceModifier, IBaseHttpClient, IApiService, DynamicSchemaRef, OpenApiSchemaProperty, OpenApiSchema, OpenApiSchemas, 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
|
-
export { ICON_TYPE, ICON_MAP, BUTTON_TYPE, ERROR_HANDLER, STATIC_SCHEMAS, 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";
|
|
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, IAclComponent, IDialogButtonConfig, IDialogConfig, IConfirmMessageConfig, IConfirmDialogConfig, IDialogService, IPromiseService, IRouteStateInfo, 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, ShapeDistance, IShape, CanvasResizeMode, CanvasItemDirection, CanvasPaintFunc, RangeCoords, RectCoords, Frame, InteractiveCanvasParams, 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
|
+
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";
|
|
7
7
|
export { AuthGuard } from "./ngx-utils/utils/auth.guard";
|