@stemy/ngx-utils 19.7.7 → 19.7.9

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.
@@ -1,7 +1,7 @@
1
1
  import 'zone.js';
2
2
  import 'reflect-metadata';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, PLATFORM_ID, Inject, Injectable, Optional, Injector, untracked, computed, signal, inject, DestroyRef, isDevMode, ErrorHandler, EventEmitter, createComponent, NgZone, Pipe, input, output, ChangeDetectorRef, ElementRef, effect, HostListener, Directive, Input, HostBinding, Output, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewChild, forwardRef, ContentChild, ContentChildren, model, contentChildren, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
4
+ import { InjectionToken, PLATFORM_ID, Inject, Injectable, Optional, Injector, inject, untracked, computed, signal, DestroyRef, isDevMode, ErrorHandler, EventEmitter, createComponent, NgZone, Pipe, input, output, ChangeDetectorRef, ElementRef, effect, HostListener, Directive, Input, HostBinding, Output, TemplateRef, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewChild, forwardRef, ContentChild, ContentChildren, Renderer2, model, contentChildren, provideAppInitializer, makeEnvironmentProviders, NgModule } from '@angular/core';
5
5
  import * as i2 from '@angular/router';
6
6
  import { ActivatedRouteSnapshot, Scroll, NavigationEnd, Router, DefaultUrlSerializer, UrlTree, UrlSegmentGroup, UrlSegment, UrlSerializer, ROUTES } from '@angular/router';
7
7
  import { BehaviorSubject, Observable, firstValueFrom, Subject, Subscription, from, delay, timer, TimeoutError, combineLatest, of, lastValueFrom } from 'rxjs';
@@ -1559,11 +1559,6 @@ class FileUtils {
1559
1559
  // @dynamic
1560
1560
  reader => reader.readAsText(file));
1561
1561
  }
1562
- static readFileAsBinaryString(file) {
1563
- return FileUtils.readFile(
1564
- // @dynamic
1565
- reader => reader.readAsBinaryString(file));
1566
- }
1567
1562
  static readFileAsDataURL(file) {
1568
1563
  return FileUtils.readFile(
1569
1564
  // @dynamic
@@ -2503,14 +2498,17 @@ function provideEntryComponents(components, moduleId) {
2503
2498
  multi: true
2504
2499
  };
2505
2500
  }
2501
+ function provideOptions(options) {
2502
+ return {
2503
+ provide: OPTIONS_TOKEN,
2504
+ useValue: options
2505
+ };
2506
+ }
2506
2507
  function provideWithOptions(type, options) {
2507
2508
  return {
2508
2509
  useFactory: function (parent) {
2509
2510
  const providers = [
2510
- {
2511
- provide: OPTIONS_TOKEN,
2512
- useValue: options
2513
- },
2511
+ provideOptions(options),
2514
2512
  {
2515
2513
  provide: type,
2516
2514
  useClass: type
@@ -2524,6 +2522,10 @@ function provideWithOptions(type, options) {
2524
2522
  deps: [Injector]
2525
2523
  };
2526
2524
  }
2525
+ function injectOptions(defaults) {
2526
+ const options = inject(OPTIONS_TOKEN, { optional: true });
2527
+ return Object.assign({}, defaults, options || {});
2528
+ }
2527
2529
 
2528
2530
  class TimerUtils {
2529
2531
  static createTimeout(func, time) {
@@ -2660,6 +2662,16 @@ function impatientPromise(factory) {
2660
2662
  };
2661
2663
  }
2662
2664
 
2665
+ function svgToDataUri(svgString) {
2666
+ // Encode as UTF-8, then to Base64
2667
+ const utf8Bytes = new TextEncoder().encode(svgString);
2668
+ let binary = "";
2669
+ for (let i = 0; i < utf8Bytes.length; i++) {
2670
+ binary += String.fromCharCode(utf8Bytes[i]);
2671
+ }
2672
+ const base64 = btoa(binary);
2673
+ return `data:image/svg+xml;base64,${base64}`;
2674
+ }
2663
2675
  class StringUtils {
2664
2676
  static concat(separator, ...strings) {
2665
2677
  return strings.filter(
@@ -3855,6 +3867,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
3855
3867
  type: Injectable
3856
3868
  }], ctorParameters: () => [] });
3857
3869
 
3870
+ class LocalHttpService extends BaseHttpService {
3871
+ get name() {
3872
+ return "local-http";
3873
+ }
3874
+ get config() {
3875
+ return this.configs.config;
3876
+ }
3877
+ get withCredentials() {
3878
+ return false;
3879
+ }
3880
+ initService() {
3881
+ super.initService();
3882
+ this.svgs = {};
3883
+ this.images = {};
3884
+ }
3885
+ url(url) {
3886
+ if (!url)
3887
+ return url;
3888
+ const config = this.config;
3889
+ const baseUrl = config.cdnUrl || config.baseUrl || "";
3890
+ return url.startsWith("data:") || url.startsWith("http") || url.startsWith("//")
3891
+ ? url
3892
+ : `${baseUrl}${url}`;
3893
+ }
3894
+ get(url, options, body) {
3895
+ options = this.makeOptions(options, "GET", body, this.caches.permanent);
3896
+ return this.toPromise(url, options);
3897
+ }
3898
+ getImage(url) {
3899
+ if (this.universal.isServer)
3900
+ return Promise.resolve(null);
3901
+ if (!url)
3902
+ return Promise.resolve(new Image());
3903
+ this.images[url] = this.images[url] || new Promise((resolve, reject) => {
3904
+ const image = new Image();
3905
+ image.crossOrigin = "Anonymous";
3906
+ image.src = this.url(url);
3907
+ image.onload = () => resolve(image);
3908
+ image.onerror = error => {
3909
+ console.warn(error);
3910
+ reject(`Can't load image from url: ${url}`);
3911
+ };
3912
+ });
3913
+ return this.images[url];
3914
+ }
3915
+ svgUrlFromSource(sourceStr, modifier) {
3916
+ if (!sourceStr.startsWith("<svg")) {
3917
+ throw new Error(`Src is possibly not an svg.. '${sourceStr.substring(0, 10)}'`);
3918
+ }
3919
+ if (!this.svgs[sourceStr]) {
3920
+ const parser = document.createElement("div");
3921
+ parser.innerHTML = sourceStr;
3922
+ const source = parser.querySelector("svg");
3923
+ const width = parseFloat(source.getAttribute("width"));
3924
+ const height = parseFloat(source.getAttribute("height"));
3925
+ const vb = source.getAttribute("viewBox").split(" ").map(parseFloat);
3926
+ this.svgs[sourceStr] = {
3927
+ source,
3928
+ width: width || vb[2],
3929
+ height: height || vb[3],
3930
+ };
3931
+ }
3932
+ const def = this.svgs[sourceStr];
3933
+ const sourceClone = def.source.cloneNode(true);
3934
+ const svgModified = ObjectUtils.isFunction(modifier) ? modifier(sourceClone, def.width, def.height) : def.source.outerHTML;
3935
+ return svgToDataUri(svgModified);
3936
+ }
3937
+ svgFromSource(sourceStr, modifier) {
3938
+ return this.getImage(this.svgUrlFromSource(sourceStr, modifier));
3939
+ }
3940
+ async getSvgUrl(url, modifier) {
3941
+ try {
3942
+ const svgSrc = await this.get(url, { responseType: "text" });
3943
+ return this.svgUrlFromSource(svgSrc, modifier);
3944
+ }
3945
+ catch (e) {
3946
+ throw new Error(`Can't get svg from url: ${url}, Error: ${e?.message}`);
3947
+ }
3948
+ }
3949
+ async getSvgImage(url, modifier) {
3950
+ try {
3951
+ const svgSrc = await this.get(url, { responseType: "text" });
3952
+ return await this.svgFromSource(svgSrc, modifier);
3953
+ }
3954
+ catch (e) {
3955
+ throw new Error(`Can't get svg from url: ${url}, Error: ${e?.message}`);
3956
+ }
3957
+ }
3958
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
3959
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService }); }
3960
+ }
3961
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService, decorators: [{
3962
+ type: Injectable
3963
+ }] });
3964
+
3858
3965
  class IconService {
3859
3966
  get isDisabled() {
3860
3967
  return this.disabled;
@@ -3863,7 +3970,8 @@ class IconService {
3863
3970
  this.disabled = value;
3864
3971
  this.iconsLoaded.emit();
3865
3972
  }
3866
- constructor() {
3973
+ constructor(http) {
3974
+ this.http = http;
3867
3975
  this.iconsLoaded = new EventEmitter();
3868
3976
  this.disabled = false;
3869
3977
  }
@@ -3872,12 +3980,20 @@ class IconService {
3872
3980
  activeIcon = typeof icons == "undefined" ? activeIcon : (icons[activeIcon] || icon);
3873
3981
  return Promise.resolve(active ? activeIcon : icon);
3874
3982
  }
3875
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3983
+ async getIconUrl(icon, modifier) {
3984
+ const src = await this.getIcon(icon, icon, false);
3985
+ return this.http.svgUrlFromSource(src, modifier);
3986
+ }
3987
+ async getIconImage(icon, modifier) {
3988
+ const src = await this.getIcon(icon, icon, false);
3989
+ return this.http.svgFromSource(src, modifier);
3990
+ }
3991
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconService, deps: [{ token: LocalHttpService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3876
3992
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconService }); }
3877
3993
  }
3878
3994
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: IconService, decorators: [{
3879
3995
  type: Injectable
3880
- }], ctorParameters: () => [] });
3996
+ }], ctorParameters: () => [{ type: LocalHttpService }] });
3881
3997
 
3882
3998
  class StaticLanguageService {
3883
3999
  get defaultLanguage() {
@@ -4162,54 +4278,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4162
4278
  type: Injectable
4163
4279
  }] });
4164
4280
 
4165
- class LocalHttpService extends BaseHttpService {
4166
- get name() {
4167
- return "local-http";
4168
- }
4169
- get config() {
4170
- return this.configs.config;
4171
- }
4172
- get withCredentials() {
4173
- return false;
4174
- }
4175
- initService() {
4176
- super.initService();
4177
- this.images = {};
4178
- }
4179
- url(url) {
4180
- if (!url)
4181
- return url;
4182
- const config = this.config;
4183
- const baseUrl = config.cdnUrl || config.baseUrl || "";
4184
- return url.startsWith("data:") || url.startsWith("http") || url.startsWith("//")
4185
- ? url
4186
- : `${baseUrl}${url}`;
4187
- }
4188
- get(url, options, body) {
4189
- options = this.makeOptions(options, "GET", body, this.caches.permanent);
4190
- return this.toPromise(url, options);
4191
- }
4192
- getImage(url) {
4193
- if (this.universal.isServer)
4194
- return Promise.resolve(null);
4195
- if (!url)
4196
- return Promise.resolve(new Image());
4197
- this.images[url] = this.images[url] || new Promise((resolve, reject) => {
4198
- const image = new Image();
4199
- image.crossOrigin = "Anonymous";
4200
- image.src = this.url(url);
4201
- image.onload = () => resolve(image);
4202
- image.onerror = reject;
4203
- });
4204
- return this.images[url];
4205
- }
4206
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
4207
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService }); }
4208
- }
4209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: LocalHttpService, decorators: [{
4210
- type: Injectable
4211
- }] });
4212
-
4213
4281
  class OpenApiService {
4214
4282
  constructor(api, staticSchemas) {
4215
4283
  this.api = api;
@@ -7765,14 +7833,6 @@ class InteractiveItemComponent {
7765
7833
  get shapes() {
7766
7834
  return this.mShapes;
7767
7835
  }
7768
- get hovered() {
7769
- return this.canvas?.hoveredItem === this;
7770
- }
7771
- set hovered(value) {
7772
- if (!this.canvas)
7773
- return;
7774
- this.canvas.hoveredItem = value ? this : null;
7775
- }
7776
7836
  get x() {
7777
7837
  return this.pos.x;
7778
7838
  }
@@ -7812,6 +7872,22 @@ class InteractiveItemComponent {
7812
7872
  this.validPos = new Point(value.x, value.y);
7813
7873
  this.valid = true;
7814
7874
  }
7875
+ get hovered() {
7876
+ return this.canvas?.hoveredItem === this;
7877
+ }
7878
+ set hovered(value) {
7879
+ if (!this.canvas)
7880
+ return;
7881
+ this.canvas.hoveredItem = value ? this : null;
7882
+ }
7883
+ get selected() {
7884
+ return this.canvas?.selectedItem === this;
7885
+ }
7886
+ set selected(value) {
7887
+ if (!this.canvas)
7888
+ return;
7889
+ this.canvas.selectedItem = value ? this : null;
7890
+ }
7815
7891
  constructor() {
7816
7892
  this.active = false;
7817
7893
  this.index = -1;
@@ -7849,8 +7925,7 @@ class InteractiveItemComponent {
7849
7925
  const target = this.restrictPosition(this.direction === "vertical" ? this.pos.x : x, this.direction === "horizontal" ? this.pos.y : y);
7850
7926
  this.pos = new Point(target);
7851
7927
  this.calcShapes();
7852
- this.valid = this.isValidByParams() &&
7853
- this.canvas.items.every(other => this === other || this.isValidByDistance(other));
7928
+ this.valid = this.checkIsValid();
7854
7929
  this.validPos = this.valid ? this.pos : this.validPos;
7855
7930
  }
7856
7931
  moveBy(dx, dy) {
@@ -7873,11 +7948,15 @@ class InteractiveItemComponent {
7873
7948
  restrictPosition(x, y) {
7874
7949
  return {
7875
7950
  x: clamp(x, this.canvas.xRange),
7876
- y: this.canvas.infinite
7951
+ y: this.canvas.isInfinite
7877
7952
  ? overflow(y, this.canvas.yRange)
7878
7953
  : clamp(y, this.canvas.yRange)
7879
7954
  };
7880
7955
  }
7956
+ checkIsValid() {
7957
+ return this.isValidByParams() &&
7958
+ this.canvas.items.every(other => this === other || this.isValidByDistance(other));
7959
+ }
7881
7960
  isValidByParams() {
7882
7961
  return !this.shapes.some(shape => {
7883
7962
  return this.canvas.excludedAreas.some(ex => {
@@ -7924,9 +8003,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
7924
8003
  type: Input
7925
8004
  }] } });
7926
8005
 
8006
+ const emptyDash = [];
7927
8007
  class InteractiveCanvasComponent {
8008
+ get isInfinite() {
8009
+ return this.infinite();
8010
+ }
8011
+ get realWidth() {
8012
+ return this.width();
8013
+ }
8014
+ get realHeight() {
8015
+ return this.height();
8016
+ }
7928
8017
  get items() {
7929
- return this.$items.value;
8018
+ return this.itemList();
7930
8019
  }
7931
8020
  get canvas() {
7932
8021
  return this.canvasElem?.nativeElement;
@@ -7935,7 +8024,14 @@ class InteractiveCanvasComponent {
7935
8024
  return this.items[this.lockedIndex];
7936
8025
  }
7937
8026
  get selectedItem() {
7938
- return this.items[this.selectedIndex];
8027
+ return this.items[this.selectedIndex()];
8028
+ }
8029
+ set selectedItem(item) {
8030
+ const ix = !item ? -1 : this.items.indexOf(item);
8031
+ const selected = untracked(() => this.selectedIndex());
8032
+ if (ix === selected)
8033
+ return;
8034
+ this.selectedIndex.set(ix);
7939
8035
  }
7940
8036
  get hoveredItem() {
7941
8037
  return this.items[this.hoveredIndex];
@@ -7943,31 +8039,59 @@ class InteractiveCanvasComponent {
7943
8039
  set hoveredItem(item) {
7944
8040
  this.hoveredIndex = !item ? -1 : this.items.indexOf(item);
7945
8041
  }
7946
- constructor(renderer, universal) {
7947
- this.renderer = renderer;
7948
- this.universal = universal;
7949
- this.infinite = false;
7950
- this.resizeMode = "fit";
7951
- this.params = {};
7952
- this.debug = false;
7953
- this.horizontal = false;
7954
- this.selectedIndex = 0;
7955
- this.realWidth = 100;
7956
- this.realHeight = 100;
7957
- this.panOffset = 0;
7958
- this.renderCtx = {};
7959
- this.beforeItems = [];
7960
- this.afterItems = [];
7961
- this.selectedIndexChange = new EventEmitter();
7962
- this.onRotate = new EventEmitter();
7963
- this.onItemPan = new EventEmitter();
7964
- this.onItemPanned = new EventEmitter();
7965
- this.onPan = new EventEmitter();
7966
- this.onPanned = new EventEmitter();
7967
- this.$items = new BehaviorSubject([]);
8042
+ constructor() {
8043
+ /**
8044
+ * Injectable options
8045
+ * @private
8046
+ */
8047
+ this.options = injectOptions({
8048
+ infinite: false,
8049
+ resizeMode: "fit",
8050
+ panOffset: 0
8051
+ });
8052
+ this.renderer = inject(Renderer2);
8053
+ this.universal = inject(UniversalService);
8054
+ /**
8055
+ * Is the canvas infinitely scrollable?
8056
+ */
8057
+ this.infinite = input(this.options.infinite);
8058
+ this.resizeMode = input(this.options.resizeMode);
8059
+ this.horizontal = input(false);
8060
+ /**
8061
+ * Real life-size width of the canvas
8062
+ */
8063
+ this.width = input(100);
8064
+ /**
8065
+ * Real life-size height of the canvas
8066
+ */
8067
+ this.height = input(100);
8068
+ /**
8069
+ * Canvas params
8070
+ */
8071
+ this.params = input({}, {
8072
+ transform: (v) => v || {}
8073
+ });
8074
+ /**
8075
+ * Model signal for selected index
8076
+ */
8077
+ this.selectedIndex = model(0);
8078
+ /**
8079
+ * Relative offset of the panning. It is based on the rendered canvas height
8080
+ */
8081
+ this.panOffset = input(this.options.panOffset);
8082
+ this.renderCtx = input({});
8083
+ this.beforeItems = input([]);
8084
+ this.afterItems = input([]);
8085
+ this.onRotate = output();
8086
+ this.onItemPan = output();
8087
+ this.onItemPanned = output();
8088
+ this.onPan = output();
8089
+ this.onPanned = output();
8090
+ this.itemList = contentChildren(InteractiveItemComponent);
7968
8091
  this.tempCanvas = this.universal.isServer ? null : document.createElement("canvas");
7969
8092
  this.shouldDraw = !this.universal.isServer;
7970
8093
  this.hoveredIndex = null;
8094
+ this.oldLength = 0;
7971
8095
  this.xRange = [0, 1];
7972
8096
  this.yRange = [0, 1];
7973
8097
  this.ratio = 1;
@@ -7982,55 +8106,72 @@ class InteractiveCanvasComponent {
7982
8106
  this.touched = false;
7983
8107
  this.panStartRotation = 0;
7984
8108
  this.panStartPos = Point.Zero;
8109
+ effect(() => {
8110
+ const items = this.itemList();
8111
+ const index = untracked(() => this.selectedIndex());
8112
+ const grow = items.length > this.oldLength;
8113
+ items.forEach((item, ix) => {
8114
+ item.canvas = this;
8115
+ item.index = ix;
8116
+ });
8117
+ this.fixRotation();
8118
+ const last = Math.max(0, items.length - 1);
8119
+ const selected = Math.min(grow ? last : index, last);
8120
+ this.selectedItem = items[selected];
8121
+ this.oldLength = items.length;
8122
+ });
8123
+ effect(() => {
8124
+ const realWidth = this.width();
8125
+ const realHeight = this.height();
8126
+ const params = this.params();
8127
+ this.xRange = normalizeRange(params.xRange || [0, realWidth]);
8128
+ this.yRange = normalizeRange(params.yRange || [0, realHeight]);
8129
+ this.resize();
8130
+ });
7985
8131
  }
7986
8132
  ngOnInit() {
7987
8133
  this.redraw();
7988
8134
  }
7989
8135
  ngOnDestroy() {
7990
8136
  this.shouldDraw = false;
7991
- this.subscription?.unsubscribe();
7992
- }
7993
- ngOnChanges() {
7994
- this.params = this.params || {};
7995
- this.renderCtx = this.renderCtx || {};
7996
- this.beforeItems = this.beforeItems || [];
7997
- this.afterItems = this.afterItems || [];
7998
- this.xRange = normalizeRange(this.params.xRange || [0, this.realWidth]);
7999
- this.yRange = normalizeRange(this.params.yRange || [0, this.realHeight]);
8000
- this.resize();
8001
- }
8002
- ngAfterViewInit() {
8003
- this.subscription = this.itemList.changes.subscribe(() => this.fixItems());
8004
- this.fixItems();
8005
8137
  }
8006
8138
  async tempPaint(cb) {
8007
- const renderCanvas = this.canvas;
8139
+ const mainCanvas = this.canvas;
8140
+ const mainCtx = mainCanvas.getContext("2d");
8008
8141
  const canvas = this.tempCanvas;
8009
- canvas.width = renderCanvas.width;
8010
- canvas.height = renderCanvas.height;
8011
8142
  const ctx = canvas.getContext("2d");
8143
+ const transform = mainCtx.getTransform();
8144
+ canvas.width = mainCanvas.width;
8145
+ canvas.height = mainCanvas.height;
8012
8146
  ctx.globalCompositeOperation = "source-over";
8013
8147
  ctx.clearRect(0, 0, canvas.width, canvas.height);
8014
- const bgCtx = renderCanvas.getContext("2d");
8015
- bgCtx.globalCompositeOperation = await cb(ctx) || "source-over";
8016
- bgCtx.drawImage(canvas, 0, 0);
8017
- bgCtx.globalCompositeOperation = "source-over";
8148
+ ctx.setTransform(transform);
8149
+ mainCtx.resetTransform();
8150
+ mainCtx.globalCompositeOperation = await cb(ctx) || "source-over";
8151
+ mainCtx.drawImage(canvas, 0, 0);
8152
+ mainCtx.globalCompositeOperation = "source-over";
8153
+ mainCtx.setTransform(transform);
8154
+ ctx.resetTransform();
8018
8155
  }
8019
8156
  resize() {
8020
- if (!this.canvasElem || !this.containerElem || !this.realWidth || !this.realWidth)
8157
+ const realWidth = this.width();
8158
+ const realHeight = this.height();
8159
+ const horizontal = this.horizontal();
8160
+ const resizeMode = this.resizeMode();
8161
+ if (!this.canvasElem || !this.containerElem)
8021
8162
  return;
8022
8163
  const canvas = this.canvasElem.nativeElement;
8023
8164
  const container = this.containerElem.nativeElement;
8024
8165
  // Calculate canvas size
8025
- const axisX = this.horizontal ? "height" : "width";
8026
- const axisY = this.horizontal ? "width" : "height";
8027
- const resize = this.resizeMode == "fit" ? Math.min : Math.max;
8166
+ const axisX = horizontal ? "height" : "width";
8167
+ const axisY = horizontal ? "width" : "height";
8168
+ const resize = resizeMode == "fit" ? Math.min : Math.max;
8028
8169
  canvas.width = container.clientWidth;
8029
8170
  canvas.height = container.clientHeight;
8030
- this.ratio = resize(canvas[axisX] / this.realWidth, canvas[axisY] / this.realHeight);
8031
- if (this.resizeMode == "fit") {
8032
- canvas[axisX] = this.realWidth * this.ratio;
8033
- canvas[axisY] = this.realHeight * this.ratio;
8171
+ this.ratio = resize(canvas[axisX] / realWidth, canvas[axisY] / realHeight);
8172
+ if (resizeMode == "fit") {
8173
+ canvas[axisX] = realWidth * this.ratio;
8174
+ canvas[axisY] = realHeight * this.ratio;
8034
8175
  }
8035
8176
  this.styles = getComputedStyle(canvas);
8036
8177
  this.ctx = canvas.getContext("2d");
@@ -8043,17 +8184,17 @@ class InteractiveCanvasComponent {
8043
8184
  onTouchStart($event) {
8044
8185
  this.hoveredIndex = this.getIndexUnderPointer($event.touches.item(0));
8045
8186
  this.lockedIndex = this.hoveredIndex;
8046
- this.touched = true;
8187
+ this.selectItem();
8047
8188
  }
8048
- onTouchEnd($event) {
8049
- this.selectItem($event.touches.item(0));
8189
+ onTouchEnd() {
8190
+ this.touched = false;
8050
8191
  }
8051
8192
  onMouseDown($event) {
8052
8193
  this.lockedIndex = this.getIndexUnderPointer($event);
8053
- this.touched = true;
8194
+ this.selectItem();
8054
8195
  }
8055
- onMouseUp($event) {
8056
- this.selectItem($event);
8196
+ onMouseUp() {
8197
+ this.touched = false;
8057
8198
  }
8058
8199
  onMouseMove($event) {
8059
8200
  if (this.touched)
@@ -8073,6 +8214,7 @@ class InteractiveCanvasComponent {
8073
8214
  }
8074
8215
  onPanMove($event) {
8075
8216
  const item = this.lockedItem;
8217
+ const horizontal = this.horizontal();
8076
8218
  const deltaX = $event.deltaX / this.ratio;
8077
8219
  const deltaY = $event.deltaY / this.ratio;
8078
8220
  const data = {
@@ -8081,19 +8223,21 @@ class InteractiveCanvasComponent {
8081
8223
  deltaX,
8082
8224
  deltaY
8083
8225
  };
8084
- if (this.horizontal) {
8226
+ if (horizontal) {
8085
8227
  data.deltaX = -deltaY;
8086
8228
  data.deltaY = +deltaX;
8087
8229
  }
8088
8230
  if (item) {
8089
8231
  item.moveTo(this.panStartPos.x + data.deltaX, this.panStartPos.y + data.deltaY);
8090
8232
  this.onItemPan.emit(data);
8233
+ return;
8091
8234
  }
8092
- else if (this.infinite) {
8093
- this.rotation = this.panStartRotation + (this.horizontal ? deltaX : deltaY) / this.realHeight * 360;
8094
- this.fixRotation();
8095
- this.onPan.emit(data);
8096
- }
8235
+ const infinite = untracked(() => this.infinite());
8236
+ if (!infinite)
8237
+ return;
8238
+ this.rotation = this.panStartRotation + (horizontal ? deltaX : deltaY) / this.realHeight * 360;
8239
+ this.fixRotation();
8240
+ this.onPan.emit(data);
8097
8241
  }
8098
8242
  onPanEnd() {
8099
8243
  const item = this.lockedItem;
@@ -8113,14 +8257,17 @@ class InteractiveCanvasComponent {
8113
8257
  this.lockedIndex = -1;
8114
8258
  }
8115
8259
  fixRotation() {
8260
+ // No need to track params changes because this function will be called from an effect
8261
+ // already depending on params anyway
8262
+ const params = untracked(() => this.params());
8116
8263
  if (this.fullHeight <= 0)
8117
8264
  return;
8118
8265
  this.rotation = overflow(Math.round(this.rotation * 100) / 100, -180, 180);
8119
8266
  this.basePan = this.rotation / 360 * this.fullHeight
8120
- + this.canvasHeight * this.panOffset;
8267
+ + this.canvasHeight * untracked(() => this.panOffset());
8121
8268
  this.cycles = this.infinite
8122
8269
  ? [this.basePan - this.fullHeight, this.basePan, this.basePan + this.fullHeight] : [0];
8123
- this.excludedAreas = (this.params.excludedAreas || []).flatMap(coords => {
8270
+ this.excludedAreas = (params.excludedAreas || []).flatMap(coords => {
8124
8271
  const x = coords.x * this.ratio;
8125
8272
  const y = coords.y * this.ratio;
8126
8273
  const width = coords.width * this.ratio;
@@ -8134,33 +8281,18 @@ class InteractiveCanvasComponent {
8134
8281
  });
8135
8282
  this.onRotate.emit(this.rotation);
8136
8283
  }
8137
- fixItems() {
8138
- const items = this.itemList.toArray();
8139
- this.$items.next(items);
8140
- items.forEach((item, ix) => {
8141
- item.canvas = this;
8142
- item.index = ix;
8143
- });
8144
- this.fixRotation();
8145
- }
8146
- selectItem(pointer) {
8147
- const selected = this.getIndexUnderPointer(pointer);
8148
- this.touched = false;
8149
- if (selected !== this.selectedIndex) {
8150
- this.selectedIndex = selected;
8151
- this.selectedIndexChange.emit(this.selectedIndex);
8152
- const item = this.selectedItem;
8153
- if (!item)
8154
- return;
8155
- item.active = !item.active;
8156
- }
8157
- this.hoveredIndex = selected;
8284
+ selectItem() {
8285
+ this.touched = true;
8286
+ const item = this.items[this.lockedIndex];
8287
+ if (!item)
8288
+ return;
8289
+ this.selectedItem = item;
8158
8290
  }
8159
8291
  toCanvasPoint(pointer) {
8160
8292
  if (!pointer || !this.canvas)
8161
8293
  return null;
8162
8294
  const canvasRect = this.canvas?.getBoundingClientRect();
8163
- return this.horizontal
8295
+ return this.horizontal()
8164
8296
  ? new Point(canvasRect.bottom - pointer.clientY, pointer.clientX - canvasRect.left)
8165
8297
  : new Point(pointer.clientX - canvasRect.left, pointer.clientY - canvasRect.top);
8166
8298
  }
@@ -8214,35 +8346,15 @@ class InteractiveCanvasComponent {
8214
8346
  await this.drawItem(ctx, item);
8215
8347
  }
8216
8348
  }
8217
- if (lockedItem) {
8218
- await this.drawItem(ctx, lockedItem);
8219
- }
8220
- if (!this.debug)
8349
+ if (!lockedItem)
8221
8350
  return;
8222
- ctx.lineWidth = 2;
8223
- ctx.strokeStyle = "rgba(114,232,45,0.55)";
8224
- for (const item of this.items) {
8225
- for (const shape of item.shapes) {
8226
- ctx.save();
8227
- ctx.translate(shape.x, shape.y);
8228
- if (shape instanceof Rect || shape instanceof Oval) {
8229
- ctx.rotate(toRadians(shape.rotation));
8230
- if (shape instanceof Oval) {
8231
- drawOval(ctx, shape.width, shape.height);
8232
- }
8233
- else {
8234
- drawRect(ctx, shape.width, shape.height);
8235
- }
8236
- ctx.stroke();
8237
- }
8238
- ctx.restore();
8239
- }
8240
- }
8351
+ await this.drawItem(ctx, lockedItem);
8241
8352
  }
8242
8353
  async drawItem(ctx, item) {
8243
8354
  for (const shape of item.shapes) {
8244
8355
  ctx.save();
8245
8356
  ctx.translate(shape.x, shape.y);
8357
+ ctx.setLineDash(emptyDash);
8246
8358
  ctx.lineWidth = 1;
8247
8359
  ctx.strokeStyle = "black";
8248
8360
  ctx.fillStyle = "white";
@@ -8255,19 +8367,26 @@ class InteractiveCanvasComponent {
8255
8367
  const canvas = ctx.canvas;
8256
8368
  if (canvas.width < 1 || canvas.height < 1)
8257
8369
  return;
8370
+ ctx.lineWidth = 1;
8371
+ ctx.strokeStyle = "black";
8372
+ ctx.fillStyle = "white";
8373
+ ctx.setLineDash(emptyDash);
8258
8374
  ctx.clearRect(0, 0, canvas.width, canvas.height);
8259
8375
  ctx.save();
8260
- if (this.horizontal) {
8376
+ if (this.horizontal()) {
8261
8377
  ctx.rotate(-Math.PI / 2);
8262
8378
  ctx.translate(-this.canvasWidth, 0);
8263
8379
  }
8380
+ const renderCtx = untracked(() => this.renderCtx());
8381
+ const beforeItems = untracked(() => this.beforeItems());
8382
+ const afterItems = untracked(() => this.afterItems());
8264
8383
  try {
8265
- for (const renderer of this.beforeItems) {
8266
- await renderer(this, this.renderCtx);
8384
+ for (const renderer of beforeItems) {
8385
+ await renderer(this, renderCtx);
8267
8386
  }
8268
8387
  await this.drawItems();
8269
- for (const renderer of this.afterItems) {
8270
- await renderer(this, this.renderCtx);
8388
+ for (const renderer of afterItems) {
8389
+ await renderer(this, renderCtx);
8271
8390
  }
8272
8391
  }
8273
8392
  catch (e) {
@@ -8275,63 +8394,24 @@ class InteractiveCanvasComponent {
8275
8394
  }
8276
8395
  ctx.restore();
8277
8396
  }
8278
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: InteractiveCanvasComponent, deps: [{ token: i0.Renderer2 }, { token: UniversalService }], target: i0.ɵɵFactoryTarget.Component }); }
8279
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: InteractiveCanvasComponent, isStandalone: false, selector: "interactive-canvas", inputs: { infinite: "infinite", resizeMode: "resizeMode", params: "params", realWidth: "realWidth", realHeight: "realHeight", debug: "debug", horizontal: "horizontal", selectedIndex: "selectedIndex", panOffset: "panOffset", renderCtx: "renderCtx", beforeItems: "beforeItems", afterItems: "afterItems" }, outputs: { selectedIndexChange: "selectedIndexChange", onRotate: "onRotate", onItemPan: "onItemPan", onItemPanned: "onItemPanned", onPan: "onPan", onPanned: "onPanned" }, host: { listeners: { "window:touchend": "onTouchEnd($event)", "window:mouseup": "onMouseUp($event)" } }, queries: [{ propertyName: "itemList", predicate: InteractiveItemComponent }], viewQueries: [{ propertyName: "containerElem", first: true, predicate: ["containerElem"], descendants: true, static: true }, { propertyName: "canvasElem", first: true, predicate: ["canvasElem"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #containerElem\n [ngClass]=\"['interactive-canvas-container', horizontal ? 'horizontal' : 'vertical']\"\n (resize)=\"resize()\"\n (touchstart)=\"onTouchStart($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onMouseLeave()\"\n (panend)=\"onPanEnd()\"\n (panmove)=\"onPanMove($event)\"\n (panstart)=\"onPanStart()\">\n <canvas #canvasElem class=\"interactive-canvas-element\"></canvas>\n</div>\n", styles: [".interactive-canvas-container{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.interactive-canvas-container .interactive-canvas-element{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
8397
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: InteractiveCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8398
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: InteractiveCanvasComponent, isStandalone: false, selector: "interactive-canvas", inputs: { infinite: { classPropertyName: "infinite", publicName: "infinite", isSignal: true, isRequired: false, transformFunction: null }, resizeMode: { classPropertyName: "resizeMode", publicName: "resizeMode", isSignal: true, isRequired: false, transformFunction: null }, horizontal: { classPropertyName: "horizontal", publicName: "horizontal", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, panOffset: { classPropertyName: "panOffset", publicName: "panOffset", isSignal: true, isRequired: false, transformFunction: null }, renderCtx: { classPropertyName: "renderCtx", publicName: "renderCtx", isSignal: true, isRequired: false, transformFunction: null }, beforeItems: { classPropertyName: "beforeItems", publicName: "beforeItems", isSignal: true, isRequired: false, transformFunction: null }, afterItems: { classPropertyName: "afterItems", publicName: "afterItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndex: "selectedIndexChange", onRotate: "onRotate", onItemPan: "onItemPan", onItemPanned: "onItemPanned", onPan: "onPan", onPanned: "onPanned" }, host: { listeners: { "window:touchend": "onTouchEnd()", "window:mouseup": "onMouseUp()" } }, queries: [{ propertyName: "itemList", predicate: InteractiveItemComponent, isSignal: true }], viewQueries: [{ propertyName: "containerElem", first: true, predicate: ["containerElem"], descendants: true, static: true }, { propertyName: "canvasElem", first: true, predicate: ["canvasElem"], descendants: true, static: true }], ngImport: i0, template: "<div #containerElem\n [ngClass]=\"['interactive-canvas-container', horizontal() ? 'horizontal' : 'vertical']\"\n (resize)=\"resize()\"\n (touchstart)=\"onTouchStart($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onMouseLeave()\"\n (panend)=\"onPanEnd()\"\n (panmove)=\"onPanMove($event)\"\n (panstart)=\"onPanStart()\">\n <canvas #canvasElem class=\"interactive-canvas-element\"></canvas>\n</div>\n", styles: [".interactive-canvas-container{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.interactive-canvas-container .interactive-canvas-element{position:absolute;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
8280
8399
  }
8281
8400
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: InteractiveCanvasComponent, decorators: [{
8282
8401
  type: Component,
8283
- args: [{ standalone: false, selector: "interactive-canvas", template: "<div #containerElem\n [ngClass]=\"['interactive-canvas-container', horizontal ? 'horizontal' : 'vertical']\"\n (resize)=\"resize()\"\n (touchstart)=\"onTouchStart($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onMouseLeave()\"\n (panend)=\"onPanEnd()\"\n (panmove)=\"onPanMove($event)\"\n (panstart)=\"onPanStart()\">\n <canvas #canvasElem class=\"interactive-canvas-element\"></canvas>\n</div>\n", styles: [".interactive-canvas-container{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.interactive-canvas-container .interactive-canvas-element{position:absolute;pointer-events:none}\n"] }]
8284
- }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: UniversalService }], propDecorators: { infinite: [{
8285
- type: Input
8286
- }], resizeMode: [{
8287
- type: Input
8288
- }], params: [{
8289
- type: Input
8290
- }], realWidth: [{
8291
- type: Input
8292
- }], realHeight: [{
8293
- type: Input
8294
- }], debug: [{
8295
- type: Input
8296
- }], horizontal: [{
8297
- type: Input
8298
- }], selectedIndex: [{
8299
- type: Input
8300
- }], panOffset: [{
8301
- type: Input
8302
- }], renderCtx: [{
8303
- type: Input
8304
- }], beforeItems: [{
8305
- type: Input
8306
- }], afterItems: [{
8307
- type: Input
8308
- }], selectedIndexChange: [{
8309
- type: Output
8310
- }], onRotate: [{
8311
- type: Output
8312
- }], onItemPan: [{
8313
- type: Output
8314
- }], onItemPanned: [{
8315
- type: Output
8316
- }], onPan: [{
8317
- type: Output
8318
- }], onPanned: [{
8319
- type: Output
8320
- }], containerElem: [{
8402
+ args: [{ standalone: false, selector: "interactive-canvas", template: "<div #containerElem\n [ngClass]=\"['interactive-canvas-container', horizontal() ? 'horizontal' : 'vertical']\"\n (resize)=\"resize()\"\n (touchstart)=\"onTouchStart($event)\"\n (mousedown)=\"onMouseDown($event)\"\n (mousemove)=\"onMouseMove($event)\"\n (mouseleave)=\"onMouseLeave()\"\n (panend)=\"onPanEnd()\"\n (panmove)=\"onPanMove($event)\"\n (panstart)=\"onPanStart()\">\n <canvas #canvasElem class=\"interactive-canvas-element\"></canvas>\n</div>\n", styles: [".interactive-canvas-container{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.interactive-canvas-container .interactive-canvas-element{position:absolute;pointer-events:none}\n"] }]
8403
+ }], ctorParameters: () => [], propDecorators: { containerElem: [{
8321
8404
  type: ViewChild,
8322
8405
  args: ["containerElem", { static: true }]
8323
8406
  }], canvasElem: [{
8324
8407
  type: ViewChild,
8325
8408
  args: ["canvasElem", { static: true }]
8326
- }], itemList: [{
8327
- type: ContentChildren,
8328
- args: [InteractiveItemComponent]
8329
8409
  }], onTouchEnd: [{
8330
8410
  type: HostListener,
8331
- args: ["window:touchend", ["$event"]]
8411
+ args: ["window:touchend"]
8332
8412
  }], onMouseUp: [{
8333
8413
  type: HostListener,
8334
- args: ["window:mouseup", ["$event"]]
8414
+ args: ["window:mouseup"]
8335
8415
  }] } });
8336
8416
 
8337
8417
  class InteractiveCircleComponent extends InteractiveItemComponent {
@@ -9124,5 +9204,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
9124
9204
  * Generated bundle index. Do not edit.
9125
9205
  */
9126
9206
 
9127
- export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AsyncMethodTargetDirective, AuthGuard, BASE_CONFIG, BUTTON_TYPE, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, BtnComponent, BtnDefaultComponent, CONFIG_SERVICE, CacheService, CanvasColor, CanvasUtils, ChipsComponent, ChunkPipe, Circle, CloseBtnComponent, ComponentLoaderDirective, ComponentLoaderService, ConfigService, DIALOG_SERVICE, DateUtils, DragDropEventPlugin, DropListComponent, DropdownBoxComponent, DropdownContentDirective, DropdownDirective, DropdownToggleDirective, DynamicTableComponent, DynamicTableTemplateDirective, EPSILON, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FakeModuleComponent, FileSystemEntry, FileUtils, FilterPipe, FindPipe, ForbiddenZone, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, ICON_MAP, ICON_SERVICE, ICON_TYPE, IConfiguration, IconComponent, IconDefaultComponent, IconDirective, IconService, IncludesPipe, Initializer, InteractiveCanvasComponent, InteractiveCircleComponent, InteractiveItemComponent, InteractiveRectComponent, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, Oval, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, STATIC_SCHEMAS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SocketClient, SocketService, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TabsComponent, TabsItemDirective, TabsTemplateDirective, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UploadComponent, ValuedPromise, ValuesPipe, addPts, cachedFactory, cancelablePromise, checkTransitions, clamp, computedPrevious, createTypedProvider, cssStyles, cssVariables, distance, distanceSq, dividePts, dotProduct, drawOval, drawRect, ensurePoint, getComponentDef, getCssVariables, getRoot, gjkDistance, gjkIntersection, hashCode, impatientPromise, isBrowser, isPoint, lengthOfPt, lerpPts, multiplyPts, negatePt, normalizePt, normalizeRange, overflow, parseSelector, perpendicular, provideEntryComponents, provideWithOptions, rotateDeg, rotateRad, selectorMatchesList, subPts, switchClass, toDegrees, toRadians, tripleProduct };
9207
+ export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AsyncMethodTargetDirective, AuthGuard, BASE_CONFIG, BUTTON_TYPE, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, BtnComponent, BtnDefaultComponent, CONFIG_SERVICE, CacheService, CanvasColor, CanvasUtils, ChipsComponent, ChunkPipe, Circle, CloseBtnComponent, ComponentLoaderDirective, ComponentLoaderService, ConfigService, DIALOG_SERVICE, DateUtils, DragDropEventPlugin, DropListComponent, DropdownBoxComponent, DropdownContentDirective, DropdownDirective, DropdownToggleDirective, DynamicTableComponent, DynamicTableTemplateDirective, EPSILON, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, ErrorHandlerService, EventsService, ExtraItemPropertiesPipe, FactoryDependencies, FakeModuleComponent, FileSystemEntry, FileUtils, FilterPipe, FindPipe, ForbiddenZone, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, ICON_MAP, ICON_SERVICE, ICON_TYPE, IConfiguration, IconComponent, IconDefaultComponent, IconDirective, IconService, IncludesPipe, Initializer, InteractiveCanvasComponent, InteractiveCircleComponent, InteractiveItemComponent, InteractiveRectComponent, IsTypePipe, JSONfn, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, Oval, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, SCRIPT_PARAMS, STATIC_SCHEMAS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShiftPipe, SocketClient, SocketService, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, TOASTER_SERVICE, TabsComponent, TabsItemDirective, TabsTemplateDirective, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UploadComponent, ValuedPromise, ValuesPipe, addPts, cachedFactory, cancelablePromise, checkTransitions, clamp, computedPrevious, createTypedProvider, cssStyles, cssVariables, distance, distanceSq, dividePts, dotProduct, drawOval, drawRect, ensurePoint, getComponentDef, getCssVariables, getRoot, gjkDistance, gjkIntersection, hashCode, impatientPromise, injectOptions, isBrowser, isPoint, lengthOfPt, lerpPts, multiplyPts, negatePt, normalizePt, normalizeRange, overflow, parseSelector, perpendicular, provideEntryComponents, provideOptions, provideWithOptions, rotateDeg, rotateRad, selectorMatchesList, subPts, svgToDataUri, switchClass, toDegrees, toRadians, tripleProduct };
9128
9208
  //# sourceMappingURL=stemy-ngx-utils.mjs.map