@stemy/ngx-utils 19.4.10 → 19.4.12

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.
@@ -221,11 +221,15 @@ export interface IAjaxRequestDetails {
221
221
  }
222
222
  export type AjaxRequestCallback = (details: IAjaxRequestDetails, params: any) => void;
223
223
  export type ScriptType = "text/javascript" | "module";
224
- export interface IScriptPromises {
225
- [src: string]: Promise<HTMLScriptElement>;
226
- }
227
- export interface IStylePromises {
228
- [src: string]: Promise<HTMLLinkElement>;
224
+ export interface ILoadableElement extends HTMLElement {
225
+ readyState?: string;
226
+ onreadystatechange?: Function;
227
+ }
228
+ export interface ILoaderPromises<T extends ILoadableElement> {
229
+ [src: string]: {
230
+ elem: T;
231
+ promise: Promise<T>;
232
+ };
229
233
  }
230
234
  export interface ISearchObservable {
231
235
  search: string;
@@ -1,6 +1,6 @@
1
1
  import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, QueryList, Renderer2 } from "@angular/core";
2
2
  import { Subscription } from "rxjs";
3
- import { InteractiveCanvas, InteractivePanEvent, InteractiveDrawFn, InteractiveCanvasPointer } from "../../common-types";
3
+ import { InteractiveCanvas, InteractiveCanvasPointer, InteractiveDrawFn, InteractivePanEvent } from "../../common-types";
4
4
  import { InteractiveItemComponent } from "./interactive-item.component";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class InteractiveCanvasComponent implements InteractiveCanvas, OnInit, OnDestroy, AfterViewInit, OnChanges {
@@ -19,18 +19,21 @@ export declare class InteractiveCanvasComponent implements InteractiveCanvas, On
19
19
  ctx: CanvasRenderingContext2D;
20
20
  pan: number;
21
21
  rotation: number;
22
+ get selectedItem(): InteractiveItemComponent;
23
+ get hoveredItem(): InteractiveItemComponent;
24
+ get lockedItem(): InteractiveItemComponent;
22
25
  protected shouldDraw: boolean;
23
26
  protected panOffset: number;
24
- protected hoveredItem: InteractiveItemComponent;
25
- protected selectedItem: InteractiveItemComponent;
27
+ protected hoveredIndex: number;
26
28
  protected items: ReadonlyArray<InteractiveItemComponent>;
27
29
  protected subscription: Subscription;
28
30
  protected containerElem: ElementRef<HTMLDivElement>;
29
31
  protected canvasElem: ElementRef<HTMLCanvasElement>;
30
32
  protected itemList: QueryList<InteractiveItemComponent>;
31
33
  protected touched: boolean;
32
- protected panFrom: number;
33
- protected lockedItem: InteractiveItemComponent;
34
+ protected deltaX: number;
35
+ protected deltaY: number;
36
+ protected lockedIndex: number;
34
37
  constructor(renderer: Renderer2);
35
38
  ngOnInit(): void;
36
39
  ngOnDestroy(): void;
@@ -49,7 +52,7 @@ export declare class InteractiveCanvasComponent implements InteractiveCanvas, On
49
52
  protected fixPan(): void;
50
53
  protected fixItems(): void;
51
54
  protected selectItem(pointer: InteractiveCanvasPointer): void;
52
- protected getItemUnderPointer(pointer: InteractiveCanvasPointer): InteractiveItemComponent;
55
+ protected getIndexUnderPointer(pointer: InteractiveCanvasPointer): number;
53
56
  protected updateCursor(): void;
54
57
  protected getCursor(): string;
55
58
  protected redraw(): void;
@@ -4,12 +4,10 @@ import { CanvasItemDirection, CanvasItemShape, InteractiveCanvas, InteractiveCan
4
4
  import { Point } from "../../utils/geometry";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class InteractiveItemComponent implements OnDestroy, OnChanges, InteractiveCanvasItem {
7
- protected basePan: number;
7
+ protected cycles: number[];
8
8
  protected pos: Point;
9
9
  protected mShapes: IShape[];
10
10
  protected subscription: Subscription;
11
- protected deltaX: number;
12
- protected deltaY: number;
13
11
  set x(value: number);
14
12
  set y(value: number);
15
13
  set position(value: IPoint);
@@ -31,7 +29,7 @@ export declare class InteractiveItemComponent implements OnDestroy, OnChanges, I
31
29
  constructor();
32
30
  ngOnDestroy(): void;
33
31
  ngOnChanges(): void;
34
- calcShapes(basePan?: number): void;
32
+ calcShapes(cycles?: number[]): void;
35
33
  hit(point: Point): boolean;
36
34
  calcShape(x: number, y: number): IShape;
37
35
  draw(ctx: CanvasRenderingContext2D, scale?: number): void;
@@ -64,8 +64,8 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
64
64
  import { UploadComponent } from "./components/upload/upload.component";
65
65
  export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof TranslatePipe)[];
66
66
  export declare const directives: (typeof AsyncMethodBase | 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 UnorderedListItemDirective | typeof UnorderedListTemplateDirective)[];
67
- export declare const components: (typeof DropListComponent | typeof DynamicTableComponent | typeof FakeModuleComponent | typeof PaginationMenuComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
68
- 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 BaseDialogService | typeof ErrorHandlerService | typeof EventsService | typeof FormatterService | typeof GlobalTemplateService | typeof IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof UniversalService | typeof WasmService | typeof DeviceDetectorService | {
67
+ export declare const components: (typeof DropListComponent | typeof DynamicTableComponent | typeof FakeModuleComponent | typeof InteractiveCanvasComponent | typeof InteractiveCircleComponent | typeof InteractiveRectComponent | typeof PaginationMenuComponent | typeof UnorderedListComponent | typeof UploadComponent)[];
68
+ 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 BaseDialogService | typeof ErrorHandlerService | typeof EventsService | 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 TranslatePipe | typeof DeviceDetectorService | {
69
69
  provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
70
70
  useClass: typeof DragDropEventPlugin;
71
71
  multi: boolean;
@@ -1,7 +1,7 @@
1
- import { ScriptType, IScriptPromises, IStylePromises } from "../common-types";
1
+ import { ScriptType } from "../common-types";
2
2
  export declare class LoaderUtils {
3
- static scriptPromises: IScriptPromises;
4
- static stylePromises: IStylePromises;
3
+ private static promises;
5
4
  static loadScript(src: string, async?: boolean, type?: ScriptType, parent?: Node): Promise<HTMLScriptElement>;
6
5
  static loadStyle(src: string, parent?: Node): Promise<HTMLLinkElement>;
6
+ private static loadElement;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.4.10",
3
+ "version": "19.4.12",
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, IDialogButtonConfig, IDialogConfig, IConfirmDialogConfig, IDialogService, DIALOG_SERVICE, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, IScriptPromises, IStylePromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, IShape, CanvasItemShape, CanvasItemDirection, InteractiveCanvas, InteractiveCanvasItem, InteractiveDrawFn, InteractivePanEvent, InteractiveCanvasPointer, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, 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, IDialogButtonConfig, IDialogConfig, IConfirmDialogConfig, IDialogService, DIALOG_SERVICE, IPromiseService, PROMISE_SERVICE, IWasi, IWasmExports, IWasm, IWasmAsync, WASI_IMPLEMENTATION, IRouteStateInfo, NavigationUrlParam, StorageMode, ToastType, IToasterService, TOASTER_SERVICE, IAsyncMessage, AsyncMethod, DropdownAttachTo, UnorderedListTemplate, UnorderedListTemplates, UnorderedListStyle, UploadType, IFileUploadResult, IFileUploadProcess, IAjaxRequestDetails, AjaxRequestCallback, ScriptType, ILoadableElement, ILoaderPromises, ISearchObservable, FactoryDependencies, ObjectType, ITimer, IExtraProperties, IGroupMap, TranslationQuery, IPageInfo, IPaginationData, PaginationDataLoader, PaginationItemContext, IPoint, IShape, CanvasItemShape, CanvasItemDirection, InteractiveCanvas, InteractiveCanvasItem, InteractiveDrawFn, InteractivePanEvent, InteractiveCanvasPointer, IHttpHeaders, IHttpParams, IRequestOptions, IIssueContext, IProgress, ProgressListener, PromiseExecutor, HttpPromise, IHttpService, EXPRESS_REQUEST, IApiService, API_SERVICE, IOpenApiSchemaProperty, IOpenApiSchema, IOpenApiSchemas, TableFilterType, ITableOrders, ITableColumn, ITableColumns, TableColumns, ITableTemplate, ITableTemplates, ITableDataQuery, TableDataLoader, DragDropEvent, DragEventHandler, ITableDragEvent, DynamicTableDragHandler, ResourceIfContext, CssSelector, CssSelectorList, DynamicComponentLocation, DynamicModuleInfo, DynamicEntryComponents, 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";