@yoobic/yobi 8.6.62 → 8.6.64

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.
@@ -3842,7 +3842,11 @@ const YooFormDynamicComponent = class {
3842
3842
  displaySegmentsCount: field.displaySegmentsCount,
3843
3843
  mentionUsers: field.allowMention ? field.mentionUsers : [],
3844
3844
  translations: this.shouldUseTranslations() ? this.translations : null,
3845
- onInputResize: () => this.scrollToField(this.focusedField, true, this.keyboardHeight),
3845
+ onInputResize: (event) => {
3846
+ if (event.target === this.focusedField) {
3847
+ this.scrollToField(this.focusedField, true, this.keyboardHeight);
3848
+ }
3849
+ },
3846
3850
  onTranslationValueUpdated: (ev) => this.onTranslationValueUpdated(ev),
3847
3851
  onFetchData: field.allowMention ? (ev) => this.onFetchData(field, ev) : null
3848
3852
  };
@@ -2924,7 +2924,7 @@ const YooGridComponent = class {
2924
2924
  h("slot", { name: "header" }),
2925
2925
  isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && h("div", { class: `gradient-overlay left ${this.extraClass}` }),
2926
2926
  h("slot", { name: "before" }),
2927
- h("yoo-ion-slides", { ref: (el) => (this.slides = el), class: newClass, options: options, onIonSlideTransitionEnd: (ev) => this.onHorizontalSlidingEnd(ev), onIonSlideDidChange: () => this.onIonSlideDidChange() }, (_d = this.filteredItems) === null || _d === void 0 ? void 0 :
2927
+ h("yoo-ion-slides", { allowKeyNavigation: false, ref: (el) => (this.slides = el), class: newClass, options: options, onIonSlideTransitionEnd: (ev) => this.onHorizontalSlidingEnd(ev), onIonSlideDidChange: () => this.onIonSlideDidChange() }, (_d = this.filteredItems) === null || _d === void 0 ? void 0 :
2928
2928
  _d.map((item, index) => (h("yoo-ion-slide", { class: slideClass }, h("div", { ref: (el) => (this.itemSlideDiv = el), class: "slide" }, this.renderEntity(item, null, index))))), emptySlides),
2929
2929
  isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && h("div", { class: `gradient-overlay right ${this.extraClass}` }),
2930
2930
  h("slot", { name: "after" })
@@ -866,24 +866,22 @@ const YooPhotoEditorComponent = class {
866
866
  const startDraw = (ev) => {
867
867
  if (ev && this.isDrawMode) {
868
868
  this.hasImageBeenCleaned = false;
869
- const { x, y } = getPointerCoordinates(ev, this.canvasDrawingsElement);
870
- drawCoordinates = { current: { x, y } };
869
+ drawCoordinates = getPointerCoordinates(ev, this.canvasDrawingsElement);
871
870
  this.canvasContext.beginPath();
872
- this.canvasContext.moveTo(x, y);
871
+ this.canvasContext.lineWidth = this.size;
872
+ this.canvasContext.strokeStyle = getCssColor(this.color, this.color);
873
+ this.canvasContext.lineCap = 'round';
874
+ this.canvasContext.lineJoin = 'round';
875
+ this.canvasContext.moveTo(drawCoordinates.x, drawCoordinates.y);
873
876
  isDrawing = true;
874
877
  }
875
878
  };
876
879
  const draw = (ev) => {
877
- if (ev && this.isDrawMode && drawCoordinates && isDrawing) {
880
+ if (ev && this.isDrawMode && isDrawing && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.x) && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.y)) {
878
881
  ev.stopPropagation();
879
- const coords = getPointerCoordinates(ev, this.canvasDrawingsElement);
880
- if (coords) {
881
- this.canvasContext.lineWidth = this.size;
882
- this.canvasContext.lineTo(coords.x, coords.y);
883
- this.canvasContext.strokeStyle = getCssColor(this.color, this.color);
884
- this.canvasContext.lineCap = 'round';
885
- this.canvasContext.stroke();
886
- }
882
+ drawCoordinates = getPointerCoordinates(ev, this.canvasDrawingsElement);
883
+ this.canvasContext.lineTo(drawCoordinates.x, drawCoordinates.y);
884
+ this.canvasContext.stroke();
887
885
  }
888
886
  };
889
887
  const stopDraw = (ev) => {
@@ -897,19 +895,19 @@ const YooPhotoEditorComponent = class {
897
895
  this.canvasContext.closePath();
898
896
  }
899
897
  };
900
- // Web
901
- if (isWeb(this.host)) {
902
- this.canvasDrawingsElement.onmousedown = startDraw;
903
- this.canvasDrawingsElement.onmousemove = draw;
904
- this.canvasDrawingsElement.onmouseup = stopDraw;
905
- this.canvasDrawingsElement.onmouseleave = stopDraw;
898
+ if (window.navigator.maxTouchPoints) {
899
+ this.canvasDrawingsElement.addEventListener('touchstart', startDraw);
900
+ this.canvasDrawingsElement.addEventListener('touchmove', draw);
901
+ this.canvasDrawingsElement.addEventListener('touchend', stopDraw);
906
902
  }
907
903
  else {
908
- // Mobile & Emulate
909
- ['touchstart', 'pointerdown'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, startDraw));
910
- ['touchmove', 'pointermove'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, draw));
911
- ['touchend', 'pointerup'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
904
+ this.canvasDrawingsElement.addEventListener('mousedown', startDraw);
905
+ this.canvasDrawingsElement.addEventListener('mousemove', draw);
906
+ ['mouseup', 'mouseleave'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
912
907
  }
908
+ this.canvasDrawingsElement.addEventListener('pointerdown', startDraw);
909
+ this.canvasDrawingsElement.addEventListener('pointermove', draw);
910
+ this.canvasDrawingsElement.addEventListener('pointerup', stopDraw);
913
911
  }
914
912
  }
915
913
  updateAnnotationStyle(styleAttr, styleValue) {
@@ -1,4 +1,4 @@
1
- import { IButton, IEntityAction, IPhotoAnnotationStyles, IXYPoint, TIconName } from '@shared/interfaces';
1
+ import { IButton, IEntityAction, IPhotoAnnotationStyles, TIconName } from '@shared/interfaces';
2
2
  export type TEditorMode = 'tools' | 'text' | 'draw' | 'annotate' | 'overlay' | 'zoom' | 'extras';
3
3
  export interface IDraggableBounds {
4
4
  minX: number;
@@ -34,6 +34,3 @@ export interface IImageConfig {
34
34
  resized?: Pick<DOMRect, 'height' | 'width'>;
35
35
  scaleFactor?: number;
36
36
  }
37
- export interface IDrawCoords {
38
- current: IXYPoint;
39
- }
@@ -0,0 +1,30 @@
1
+ export declare const LANGUAGES: {
2
+ ar: string;
3
+ bg: string;
4
+ cz: string;
5
+ zht: string;
6
+ zhs: string;
7
+ zhk: string;
8
+ ca: string;
9
+ nl: string;
10
+ en: string;
11
+ us: string;
12
+ de: string;
13
+ el: string;
14
+ es: string;
15
+ fr: string;
16
+ he: string;
17
+ hu: string;
18
+ it: string;
19
+ ja: string;
20
+ kr: string;
21
+ pl: string;
22
+ br: string;
23
+ pt: string;
24
+ ro: string;
25
+ ru: string;
26
+ sk: string;
27
+ th: string;
28
+ tr: string;
29
+ ua: string;
30
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "8.6.62",
3
+ "version": "8.6.64",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",