@stemy/ngx-utils 19.9.10 → 19.9.13

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.
@@ -347,14 +347,6 @@ export interface RectCoords {
347
347
  height: number;
348
348
  id?: string;
349
349
  }
350
- /**
351
- * Rectangle frame interface
352
- */
353
- export interface Frame extends IShape {
354
- width: number;
355
- height: number;
356
- rotation: number;
357
- }
358
350
  /**
359
351
  * Interface for an interactive canvas params
360
352
  */
@@ -377,12 +369,13 @@ export interface InteractiveCanvasArea {
377
369
  export interface InteractiveCanvasItem extends InteractiveCanvasArea {
378
370
  readonly position: IPoint;
379
371
  readonly rotation: number;
380
- readonly frame: Frame;
381
372
  readonly isValid: boolean;
382
373
  readonly validPosition: IPoint;
383
374
  readonly validRotation: number;
384
375
  readonly hovered: boolean;
385
376
  readonly selected: boolean;
377
+ readonly cursor: string;
378
+ readonly direction: CanvasItemDirection;
386
379
  readonly active: boolean;
387
380
  readonly canvas: InteractiveCanvas;
388
381
  readonly index: number;
@@ -420,7 +413,7 @@ export interface InteractiveCanvas {
420
413
  rendered?: boolean;
421
414
  tempPaint(cb: CanvasPaintFunc): Promise<void>;
422
415
  }
423
- export type InteractiveCanvasRenderer = (renderCanvas: InteractiveCanvas, renderCtx: Record<string, any>) => MaybePromise<void>;
416
+ export type InteractiveCanvasRenderer = (renderCanvas: InteractiveCanvas, renderCtx: Record<string, any>, params?: InteractiveCanvasParams) => MaybePromise<void>;
424
417
  export interface InteractivePanEvent {
425
418
  canvas: InteractiveCanvas;
426
419
  item: InteractiveCanvasItem;
@@ -502,6 +495,9 @@ export interface SvgDefinition {
502
495
  height: number;
503
496
  }
504
497
  export type SvgSourceModifier = (svg: SVGSVGElement, width: number, height: number) => string;
498
+ export interface ExpressRequest {
499
+ [key: string]: any;
500
+ }
505
501
  export interface IBaseHttpClient extends HttpClient {
506
502
  readonly requestHeaders: Readonly<HttpRequestHeaders>;
507
503
  readonly requestParams: Readonly<HttpRequestQuery>;
@@ -33,7 +33,7 @@ export declare class InteractiveCanvasComponent implements InteractiveCanvas, On
33
33
  /**
34
34
  * Canvas params
35
35
  */
36
- readonly params: import("@angular/core").InputSignalWithTransform<InteractiveCanvasParams, InteractiveCanvasParams>;
36
+ readonly params: import("@angular/core").InputSignal<InteractiveCanvasParams>;
37
37
  /**
38
38
  * Model signal for selected index
39
39
  */
@@ -103,7 +103,6 @@ export declare class InteractiveCanvasComponent implements InteractiveCanvas, On
103
103
  protected toCanvasPoint(pointer: InteractiveCanvasPointer): Point;
104
104
  protected getIndexUnderPointer(pointer: InteractiveCanvasPointer): number;
105
105
  protected updateCursor(): void;
106
- protected getCursor(): string;
107
106
  protected redraw(): void;
108
107
  protected drawItems(): Promise<void>;
109
108
  protected drawItem(ctx: CanvasRenderingContext2D, item: InteractiveCanvasItem): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { OnChanges } from "@angular/core";
2
- import { CanvasItemDirection, Frame, InteractiveCanvas, InteractiveCanvasArea, InteractiveCanvasItem, InteractiveCanvasParams, IPoint, IShape } from "../../common-types";
2
+ import { CanvasItemDirection, InteractiveCanvas, InteractiveCanvasArea, InteractiveCanvasItem, InteractiveCanvasParams, IPoint, IShape } from "../../common-types";
3
3
  import { MaybePromise } from "../../helper-types";
4
4
  import { Point, Rect } from "../../utils/geometry";
5
5
  import * as i0 from "@angular/core";
@@ -9,7 +9,6 @@ export declare class InteractiveItemComponent implements OnChanges, InteractiveC
9
9
  protected mFrame: Rect;
10
10
  protected mShapes: IShape[];
11
11
  get id(): string;
12
- get frame(): Frame;
13
12
  get shapes(): ReadonlyArray<IShape>;
14
13
  get x(): number;
15
14
  set x(value: number);
@@ -28,12 +27,14 @@ export declare class InteractiveItemComponent implements OnChanges, InteractiveC
28
27
  set hovered(value: boolean);
29
28
  get selected(): boolean;
30
29
  set selected(value: boolean);
30
+ get cursor(): string;
31
31
  direction: CanvasItemDirection;
32
32
  disabled: boolean;
33
33
  active: boolean;
34
34
  canvas: InteractiveCanvas;
35
35
  index: number;
36
36
  canvasParams: InteractiveCanvasParams;
37
+ otherItems: ReadonlyArray<IShape>;
37
38
  hitShapes: ReadonlyArray<IShape>;
38
39
  protected validPos: Point;
39
40
  protected validRot: number;
@@ -1,7 +1,6 @@
1
1
  import { Injector } from "@angular/core";
2
2
  import { HttpHeaders, HttpParams } from "@angular/common/http";
3
- import { Request } from "express";
4
- import { CacheExpireMode, HttpClientRequestOptions, HttpRequestHeaders, HttpRequestOptions, HttpRequestQuery, IConfigService, IHttpService, IIssueContext, ILanguageService, IPaginationData, IToasterService, ProgressListener, UploadData } from "../common-types";
3
+ import { CacheExpireMode, ExpressRequest, HttpClientRequestOptions, HttpRequestHeaders, HttpRequestOptions, HttpRequestQuery, IConfigService, IHttpService, IIssueContext, ILanguageService, IPaginationData, IToasterService, ProgressListener, UploadData } from "../common-types";
5
4
  import { BaseHttpClient } from "./base-http.client";
6
5
  import { UniversalService } from "./universal.service";
7
6
  import { StorageService } from "./storage.service";
@@ -17,7 +16,7 @@ export declare class BaseHttpService implements IHttpService {
17
16
  readonly language: ILanguageService;
18
17
  readonly toaster: IToasterService;
19
18
  readonly configs: IConfigService;
20
- readonly request: Request;
19
+ readonly request: ExpressRequest;
21
20
  get name(): string;
22
21
  get requestHeaders(): Readonly<HttpRequestHeaders>;
23
22
  get requestParams(): Readonly<HttpRequestQuery>;
@@ -26,7 +25,7 @@ export declare class BaseHttpService implements IHttpService {
26
25
  protected static failedRequests: Array<() => void>;
27
26
  protected readonly bag: RequestBag;
28
27
  protected static retryFailedRequests(): void;
29
- constructor(injector: Injector, client: BaseHttpClient, storage: StorageService, caches: CacheService, language: ILanguageService, toaster: IToasterService, configs: IConfigService, request?: Request);
28
+ constructor(injector: Injector, client: BaseHttpClient, storage: StorageService, caches: CacheService, language: ILanguageService, toaster: IToasterService, configs: IConfigService, request?: ExpressRequest);
30
29
  protected initService(): void;
31
30
  setHeader(name: string, value?: string | string[]): void;
32
31
  setParam(name: string, value?: any): void;
@@ -1,6 +1,5 @@
1
1
  import { InjectionToken, Type } from "@angular/core";
2
- import { Request } from "express";
3
- import { ButtonProps, DynamicEntryComponents, DynamicModuleInfo, ErrorHandlerCallback, IApiService, IAuthService, IConfigService, IConfiguration, IconMap, IconProps, IDialogService, IIconService, ILanguageService, IPromiseService, IToasterService, OpenApiSchemas, OpenApiSchemaSelector, ResizeEventStrategy } from "./common-types";
2
+ import { ButtonProps, DynamicEntryComponents, DynamicModuleInfo, ErrorHandlerCallback, ExpressRequest, IApiService, IAuthService, IConfigService, IConfiguration, IconMap, IconProps, IDialogService, IIconService, ILanguageService, IPromiseService, IToasterService, OpenApiSchemas, OpenApiSchemaSelector, ResizeEventStrategy } from "./common-types";
4
3
  export declare const ICON_TYPE: InjectionToken<Type<IconProps>>;
5
4
  export declare const ICON_MAP: InjectionToken<IconMap>;
6
5
  export declare const BUTTON_TYPE: InjectionToken<Type<ButtonProps>>;
@@ -12,7 +11,7 @@ export declare const TOASTER_SERVICE: InjectionToken<IToasterService>;
12
11
  export declare const DIALOG_SERVICE: InjectionToken<IDialogService<any>>;
13
12
  export declare const SOCKET_IO_PATH: InjectionToken<string>;
14
13
  export declare const PROMISE_SERVICE: InjectionToken<IPromiseService>;
15
- export declare const EXPRESS_REQUEST: InjectionToken<Request>;
14
+ export declare const EXPRESS_REQUEST: InjectionToken<ExpressRequest>;
16
15
  export declare const API_SERVICE: InjectionToken<IApiService>;
17
16
  export declare const DYNAMIC_ENTRY_COMPONENTS: InjectionToken<DynamicEntryComponents[]>;
18
17
  export declare const DYNAMIC_MODULE_INFO: InjectionToken<DynamicModuleInfo[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.9.10",
3
+ "version": "19.9.13",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",
@@ -14,7 +14,6 @@
14
14
  "@angular/router": "^19.2.14",
15
15
  "@angular/platform-browser": "^19.2.14",
16
16
  "@angular/platform-server": "^19.2.14",
17
- "express": "~4.21.2",
18
17
  "element-resize-detector": "^1.2.4",
19
18
  "rxjs": "^7.8.2",
20
19
  "luxon": "^3.6.1",
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, Frame, 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, 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";
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";