@stemy/ngx-utils 19.9.9 → 19.9.11
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 +197 -152
- package/fesm2022/stemy-ngx-utils.mjs.map +1 -1
- package/ngx-utils/common-types.d.ts +18 -14
- package/ngx-utils/components/interactive-canvas/interactive-canvas.component.d.ts +3 -3
- package/ngx-utils/components/interactive-canvas/interactive-item.component.d.ts +7 -4
- package/ngx-utils/ngx-utils.imports.d.ts +3 -3
- package/ngx-utils/services/base-http.service.d.ts +3 -4
- package/ngx-utils/tokens.d.ts +2 -3
- package/ngx-utils/utils/canvas-renderers/hit-zone.renderer.d.ts +9 -0
- package/ngx-utils/utils/canvas.d.ts +2 -0
- package/ngx-utils/utils/geometry/functions.d.ts +2 -0
- package/ngx-utils/utils/geometry/gjk.d.ts +2 -3
- package/ngx-utils/utils/geometry/index.d.ts +2 -2
- package/ngx-utils/utils/geometry/shapes.d.ts +14 -8
- package/package.json +1 -2
- package/public_api.d.ts +4 -3
- /package/ngx-utils/utils/canvas-renderers/{exclusions-renderer.d.ts → exclusions.renderer.d.ts} +0 -0
|
@@ -326,20 +326,14 @@ export interface ShapeIntersection {
|
|
|
326
326
|
pb?: IPoint;
|
|
327
327
|
point?: IPoint;
|
|
328
328
|
}
|
|
329
|
-
export interface ShapeDistance {
|
|
330
|
-
distance: number;
|
|
331
|
-
pa?: IPoint;
|
|
332
|
-
pb?: IPoint;
|
|
333
|
-
}
|
|
334
329
|
export interface IShape extends IPoint {
|
|
335
330
|
readonly center: IPoint;
|
|
336
|
-
readonly subShapes?: ReadonlyArray<IShape>;
|
|
337
331
|
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
338
|
-
support(dir: IPoint): IPoint;
|
|
332
|
+
support(dir: IPoint, logs?: boolean): IPoint;
|
|
333
|
+
expand(value: number): IShape;
|
|
339
334
|
move(pos: IPoint): IShape;
|
|
340
|
-
intersection(shape: IShape): ShapeIntersection;
|
|
341
|
-
intersects(shape: IShape): boolean;
|
|
342
|
-
minDistance(shape: IShape): ShapeDistance;
|
|
335
|
+
intersection(shape: IShape, logs?: boolean): ShapeIntersection;
|
|
336
|
+
intersects(shape: IShape, logs?: boolean): boolean;
|
|
343
337
|
distance(shape: IShape): number;
|
|
344
338
|
}
|
|
345
339
|
export type CanvasResizeMode = "fit" | "fill";
|
|
@@ -351,7 +345,7 @@ export interface RectCoords {
|
|
|
351
345
|
y: number;
|
|
352
346
|
width: number;
|
|
353
347
|
height: number;
|
|
354
|
-
|
|
348
|
+
id?: string;
|
|
355
349
|
}
|
|
356
350
|
/**
|
|
357
351
|
* Rectangle frame interface
|
|
@@ -370,14 +364,20 @@ export interface InteractiveCanvasParams {
|
|
|
370
364
|
excludedAreas?: ReadonlyArray<RectCoords>;
|
|
371
365
|
[key: string]: any;
|
|
372
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Interface for an area that covers a part of the interactive canvas
|
|
369
|
+
*/
|
|
370
|
+
export interface InteractiveCanvasArea {
|
|
371
|
+
readonly id: string;
|
|
372
|
+
readonly shapes: ReadonlyArray<IShape>;
|
|
373
|
+
}
|
|
373
374
|
/**
|
|
374
375
|
* Interface for an interactive canvas item
|
|
375
376
|
*/
|
|
376
|
-
export interface InteractiveCanvasItem {
|
|
377
|
+
export interface InteractiveCanvasItem extends InteractiveCanvasArea {
|
|
377
378
|
readonly position: IPoint;
|
|
378
379
|
readonly rotation: number;
|
|
379
380
|
readonly frame: Frame;
|
|
380
|
-
readonly shapes: ReadonlyArray<IShape>;
|
|
381
381
|
readonly isValid: boolean;
|
|
382
382
|
readonly validPosition: IPoint;
|
|
383
383
|
readonly validRotation: number;
|
|
@@ -387,6 +387,7 @@ export interface InteractiveCanvasItem {
|
|
|
387
387
|
readonly canvas: InteractiveCanvas;
|
|
388
388
|
readonly index: number;
|
|
389
389
|
readonly canvasParams: InteractiveCanvasParams;
|
|
390
|
+
readonly hitShapes: ReadonlyArray<IShape>;
|
|
390
391
|
draw(ctx: CanvasRenderingContext2D, shape: IShape): MaybePromise<void>;
|
|
391
392
|
}
|
|
392
393
|
export type InteractiveCanvasItems = ReadonlyArray<InteractiveCanvasItem>;
|
|
@@ -415,7 +416,7 @@ export interface InteractiveCanvas {
|
|
|
415
416
|
readonly rotation: number;
|
|
416
417
|
readonly basePan: number;
|
|
417
418
|
readonly cycles?: ReadonlyArray<number>;
|
|
418
|
-
readonly excludedAreas?: ReadonlyArray<
|
|
419
|
+
readonly excludedAreas?: ReadonlyArray<InteractiveCanvasArea>;
|
|
419
420
|
rendered?: boolean;
|
|
420
421
|
tempPaint(cb: CanvasPaintFunc): Promise<void>;
|
|
421
422
|
}
|
|
@@ -501,6 +502,9 @@ export interface SvgDefinition {
|
|
|
501
502
|
height: number;
|
|
502
503
|
}
|
|
503
504
|
export type SvgSourceModifier = (svg: SVGSVGElement, width: number, height: number) => string;
|
|
505
|
+
export interface ExpressRequest {
|
|
506
|
+
[key: string]: any;
|
|
507
|
+
}
|
|
504
508
|
export interface IBaseHttpClient extends HttpClient {
|
|
505
509
|
readonly requestHeaders: Readonly<HttpRequestHeaders>;
|
|
506
510
|
readonly requestParams: Readonly<HttpRequestQuery>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementRef, OnDestroy, OnInit, Renderer2 } from "@angular/core";
|
|
2
|
-
import { CanvasPaintFunc, CanvasResizeMode, InteractiveCanvas, InteractiveCanvasItem, InteractiveCanvasParams, InteractiveCanvasPointer, InteractiveCanvasRenderer, InteractivePanEvent, IPoint, RangeCoords } from "../../common-types";
|
|
3
|
-
import { Point
|
|
2
|
+
import { CanvasPaintFunc, CanvasResizeMode, InteractiveCanvas, InteractiveCanvasArea, InteractiveCanvasItem, InteractiveCanvasParams, InteractiveCanvasPointer, InteractiveCanvasRenderer, InteractivePanEvent, IPoint, RangeCoords } from "../../common-types";
|
|
3
|
+
import { Point } from "../../utils/geometry";
|
|
4
4
|
import { UniversalService } from "../../services/universal.service";
|
|
5
5
|
import { InteractiveItemComponent } from "./interactive-item.component";
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -73,7 +73,7 @@ export declare class InteractiveCanvasComponent implements InteractiveCanvas, On
|
|
|
73
73
|
rotation: number;
|
|
74
74
|
basePan: number;
|
|
75
75
|
cycles: number[];
|
|
76
|
-
excludedAreas:
|
|
76
|
+
excludedAreas: InteractiveCanvasArea[];
|
|
77
77
|
protected tempCanvas: HTMLCanvasElement;
|
|
78
78
|
protected shouldDraw: boolean;
|
|
79
79
|
protected hoveredIndex: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnChanges } from "@angular/core";
|
|
2
|
-
import { CanvasItemDirection, Frame, InteractiveCanvas, InteractiveCanvasItem, InteractiveCanvasParams, IPoint, IShape } from "../../common-types";
|
|
2
|
+
import { CanvasItemDirection, Frame, 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";
|
|
@@ -8,7 +8,7 @@ export declare class InteractiveItemComponent implements OnChanges, InteractiveC
|
|
|
8
8
|
protected rot: number;
|
|
9
9
|
protected mFrame: Rect;
|
|
10
10
|
protected mShapes: IShape[];
|
|
11
|
-
|
|
11
|
+
get id(): string;
|
|
12
12
|
get frame(): Frame;
|
|
13
13
|
get shapes(): ReadonlyArray<IShape>;
|
|
14
14
|
get x(): number;
|
|
@@ -34,6 +34,7 @@ export declare class InteractiveItemComponent implements OnChanges, InteractiveC
|
|
|
34
34
|
canvas: InteractiveCanvas;
|
|
35
35
|
index: number;
|
|
36
36
|
canvasParams: InteractiveCanvasParams;
|
|
37
|
+
hitShapes: ReadonlyArray<IShape>;
|
|
37
38
|
protected validPos: Point;
|
|
38
39
|
protected validRot: number;
|
|
39
40
|
constructor();
|
|
@@ -48,12 +49,14 @@ export declare class InteractiveItemComponent implements OnChanges, InteractiveC
|
|
|
48
49
|
moveEnd(): void;
|
|
49
50
|
rotateTo(value: number): void;
|
|
50
51
|
rotateEnd(): void;
|
|
52
|
+
protected makeHitShapes(): void;
|
|
53
|
+
protected clearHitShapes(): void;
|
|
51
54
|
protected restrictPosition(x: number, y: number): IPoint;
|
|
52
55
|
protected checkIsValid(): boolean;
|
|
53
56
|
protected isValidByParams(): boolean;
|
|
54
|
-
protected isValidByDistance(other:
|
|
57
|
+
protected isValidByDistance(other: IShape): boolean;
|
|
55
58
|
protected distToPixels(value: number): number;
|
|
56
|
-
protected getMinDistance(other:
|
|
59
|
+
protected getMinDistance(other: InteractiveCanvasArea): number;
|
|
57
60
|
protected calcShape(x: number, y: number): IShape;
|
|
58
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<InteractiveItemComponent, never>;
|
|
59
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<InteractiveItemComponent, "__interactive-item__", never, { "x": { "alias": "x"; "required": false; }; "y": { "alias": "y"; "required": false; }; "position": { "alias": "position"; "required": false; }; "rotation": { "alias": "rotation"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -65,9 +65,9 @@ import { UnorderedListComponent } from "./components/unordered-list/unordered-li
|
|
|
65
65
|
import { UploadComponent } from "./components/upload/upload.component";
|
|
66
66
|
import { WysiwygComponent } from "./components/wysiwyg/wysiwyg.component";
|
|
67
67
|
export declare const pipes: (typeof FilterPipe | typeof FormatNumberPipe | typeof GlobalTemplatePipe | typeof IncludesPipe | typeof ReducePipe | typeof RoundPipe | typeof SafeHtmlPipe | typeof SyncAsyncPipe | typeof TranslatePipe)[];
|
|
68
|
-
export declare const directives: (typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof
|
|
69
|
-
export declare const components: (typeof
|
|
70
|
-
export declare const providers: (typeof
|
|
68
|
+
export declare const directives: (typeof TabsItemDirective | typeof DynamicTableTemplateDirective | typeof DropdownDirective | typeof AsyncMethodBase | typeof AsyncMethodDirective | typeof AsyncMethodTargetDirective | typeof BackgroundDirective | typeof ComponentLoaderDirective | typeof GlobalTemplateDirective | typeof IconDirective | typeof NgxTemplateOutletDirective | typeof PaginationDirective | typeof PaginationItemDirective | typeof ResourceIfDirective | typeof StickyDirective | typeof StickyClassDirective | typeof DropdownContentDirective | typeof DropdownToggleDirective | 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 GlobalTemplateService | 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 IconService | typeof StaticLanguageService | typeof OpenApiService | typeof PromiseService | typeof SocketService | typeof StateService | typeof StorageService | typeof BaseToasterService | typeof CacheService | typeof ComponentLoaderService | typeof TranslatedUrlSerializer | typeof DeviceDetectorService | {
|
|
71
71
|
provide: import("@angular/core").InjectionToken<import("@angular/platform-browser").EventManagerPlugin[]>;
|
|
72
72
|
useClass: typeof DragDropEventPlugin;
|
|
73
73
|
multi: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Injector } from "@angular/core";
|
|
2
2
|
import { HttpHeaders, HttpParams } from "@angular/common/http";
|
|
3
|
-
import {
|
|
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:
|
|
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?:
|
|
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;
|
package/ngx-utils/tokens.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InjectionToken, Type } from "@angular/core";
|
|
2
|
-
import {
|
|
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<
|
|
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[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Invokable } from "invokable";
|
|
2
|
+
import { InteractiveCanvas, InteractiveCanvasRenderer } from "../../common-types";
|
|
3
|
+
export declare class HitZoneRenderer {
|
|
4
|
+
protected pattern: CanvasPattern;
|
|
5
|
+
constructor();
|
|
6
|
+
[Invokable.call](renderCanvas: InteractiveCanvas): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export interface HitZoneRenderer extends InteractiveCanvasRenderer {
|
|
9
|
+
}
|
|
@@ -11,3 +11,5 @@ export declare class CanvasUtils {
|
|
|
11
11
|
private static getTextBitmapHeight;
|
|
12
12
|
private static halveValidateFontSize;
|
|
13
13
|
}
|
|
14
|
+
export declare function getOffScreenCanvas(): HTMLCanvasElement;
|
|
15
|
+
export declare function createStripePattern(size: number, color1: string, color2: string): CanvasPattern;
|
|
@@ -9,7 +9,9 @@ export declare function normalizePt(p: IPoint): IPoint;
|
|
|
9
9
|
export declare function addPts(a: IPoint, b: IPoint): IPoint;
|
|
10
10
|
export declare function distanceSq(a: IPoint, b: IPoint): number;
|
|
11
11
|
export declare function distance(a: IPoint, b: IPoint): number;
|
|
12
|
+
export declare function scalePt(p: IPoint, s: number): IPoint;
|
|
12
13
|
export declare function lerpPts(a: IPoint, b: IPoint, t: number): IPoint;
|
|
14
|
+
export declare function lengthSq(p: IPoint): number;
|
|
13
15
|
export declare function lengthOfPt(p: IPoint): number;
|
|
14
16
|
export declare function multiplyPts(a: IPoint, b: IPoint | number): IPoint;
|
|
15
17
|
export declare function dividePts(a: IPoint, b: IPoint | number): IPoint;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { IShape,
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function gjkIntersection(A: IShape, B: IShape): ShapeIntersection;
|
|
1
|
+
import { IShape, ShapeIntersection } from "../../common-types";
|
|
2
|
+
export declare function gjkIntersection(A: IShape, B: IShape, logs: boolean): ShapeIntersection;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, eqPts, rotateDeg, rotateRad, toDegrees, toRadians } from "./functions";
|
|
1
|
+
export { gjkIntersection } from "./gjk";
|
|
2
|
+
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, scalePt, lerpPts, lengthSq, lengthOfPt, multiplyPts, dividePts, subPts, eqPts, rotateDeg, rotateRad, toDegrees, toRadians } from "./functions";
|
|
3
3
|
export { Circle, Point, Rect, Oval, ShapeGroup } from "./shapes";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPoint, IShape,
|
|
1
|
+
import { IPoint, IShape, ShapeIntersection } from "../../common-types";
|
|
2
2
|
declare abstract class Shape implements IShape {
|
|
3
3
|
get center(): IPoint;
|
|
4
4
|
get x(): number;
|
|
@@ -7,10 +7,10 @@ declare abstract class Shape implements IShape {
|
|
|
7
7
|
protected constructor(x: number, y: number);
|
|
8
8
|
abstract getPath(x: number, y: number, ratio?: number): Path2D;
|
|
9
9
|
abstract support(dir: IPoint): IPoint;
|
|
10
|
+
abstract expand(value: number): IShape;
|
|
10
11
|
abstract move(pos: IPoint): IShape;
|
|
11
|
-
intersection(shape: IShape): ShapeIntersection;
|
|
12
|
-
intersects(shape: IShape): boolean;
|
|
13
|
-
minDistance(shape: IShape): ShapeDistance;
|
|
12
|
+
intersection(shape: IShape, logs: boolean): ShapeIntersection;
|
|
13
|
+
intersects(shape: IShape, logs: boolean): boolean;
|
|
14
14
|
distance(shape: IShape): number;
|
|
15
15
|
}
|
|
16
16
|
export declare class Point extends Shape {
|
|
@@ -20,6 +20,7 @@ export declare class Point extends Shape {
|
|
|
20
20
|
constructor(xOrP: number | IPoint, y?: number);
|
|
21
21
|
getPath(x: number, y: number): Path2D;
|
|
22
22
|
support(): IPoint;
|
|
23
|
+
expand(): IShape;
|
|
23
24
|
move(pos: IPoint): IShape;
|
|
24
25
|
add(p: IPoint): Point;
|
|
25
26
|
subtract(p: IPoint): Point;
|
|
@@ -37,9 +38,11 @@ export declare class Rect extends Shape {
|
|
|
37
38
|
readonly width: number;
|
|
38
39
|
readonly height: number;
|
|
39
40
|
readonly rotation: number;
|
|
40
|
-
|
|
41
|
+
readonly radius: number;
|
|
42
|
+
constructor(x: number, y: number, width: number, height: number, rotation?: number, radius?: number);
|
|
41
43
|
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
42
|
-
support(dir: IPoint): IPoint;
|
|
44
|
+
support(dir: IPoint, logs?: boolean): IPoint;
|
|
45
|
+
expand(value: number): Rect;
|
|
43
46
|
move(pos: IPoint): Rect;
|
|
44
47
|
}
|
|
45
48
|
export declare class Oval extends Shape {
|
|
@@ -49,18 +52,21 @@ export declare class Oval extends Shape {
|
|
|
49
52
|
constructor(x: number, y: number, width: number, height: number, rotation?: number);
|
|
50
53
|
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
51
54
|
support(dir: IPoint): IPoint;
|
|
55
|
+
expand(value: number): Oval;
|
|
52
56
|
move(pos: IPoint): Oval;
|
|
53
57
|
}
|
|
54
58
|
export declare class Circle extends Oval {
|
|
55
59
|
readonly radius: number;
|
|
56
60
|
constructor(x: number, y: number, radius: number, rotation?: number);
|
|
61
|
+
expand(value: number): Circle;
|
|
57
62
|
move(pos: IPoint): Circle;
|
|
58
63
|
}
|
|
59
64
|
export declare class ShapeGroup extends Shape {
|
|
60
|
-
readonly subShapes: ReadonlyArray<IShape>;
|
|
65
|
+
protected readonly subShapes: ReadonlyArray<IShape>;
|
|
61
66
|
constructor(x: number, y: number, subShapes: ReadonlyArray<IShape>);
|
|
62
67
|
getPath(x: number, y: number, ratio?: number): Path2D;
|
|
63
|
-
support(): IPoint;
|
|
68
|
+
support(dir: IPoint): IPoint;
|
|
69
|
+
expand(value: number): IShape;
|
|
64
70
|
move(pos: IPoint): IShape;
|
|
65
71
|
}
|
|
66
72
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stemy/ngx-utils",
|
|
3
|
-
"version": "19.9.
|
|
3
|
+
"version": "19.9.11",
|
|
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,
|
|
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";
|
|
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";
|
|
@@ -13,9 +13,10 @@ export { FileUtils } from "./ngx-utils/utils/file.utils";
|
|
|
13
13
|
export { ForbiddenZone } from "./ngx-utils/utils/forbidden-zone";
|
|
14
14
|
export { GenericValue } from "./ngx-utils/utils/generic-value";
|
|
15
15
|
export { FileSystemEntryOpenResult, FileSystemEntryOpenCb, FileSystemEntry } from "./ngx-utils/utils/file-system";
|
|
16
|
-
export {
|
|
16
|
+
export { HitZoneRenderer } from "./ngx-utils/utils/canvas-renderers/hit-zone.renderer";
|
|
17
|
+
export { ExclusionsRenderer } from "./ngx-utils/utils/canvas-renderers/exclusions.renderer";
|
|
17
18
|
export { RulerCanvasRenderer } from "./ngx-utils/utils/canvas-renderers/ruler-canvas.renderer";
|
|
18
|
-
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, lerpPts, lengthOfPt, multiplyPts, dividePts, subPts, eqPts, rotateDeg, rotateRad, toDegrees, toRadians,
|
|
19
|
+
export { dotProduct, tripleProduct, isPoint, ensurePoint, perpendicular, negatePt, normalizePt, addPts, distanceSq, distance, scalePt, lerpPts, lengthSq, lengthOfPt, multiplyPts, dividePts, subPts, eqPts, rotateDeg, rotateRad, toDegrees, toRadians, Point, Rect, Oval, Circle, ShapeGroup } from "./ngx-utils/utils/geometry";
|
|
19
20
|
export { Initializer } from "./ngx-utils/utils/initializer";
|
|
20
21
|
export { stringify } from "./ngx-utils/utils/json.utils";
|
|
21
22
|
export { ReflectUtils } from "./ngx-utils/utils/reflect.utils";
|
/package/ngx-utils/utils/canvas-renderers/{exclusions-renderer.d.ts → exclusions.renderer.d.ts}
RENAMED
|
File without changes
|