@yoobic/yobi 8.6.62 → 8.6.63
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/dist/cjs/yoo-form-date-time.cjs.entry.js +32 -0
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +1 -1
- package/dist/cjs/yoo-grid.cjs.entry.js +1 -1
- package/dist/cjs/yoo-photo-editor.cjs.entry.js +20 -22
- package/dist/collection/components/3.organisms/photo-editor/photo-editor.js +20 -22
- package/dist/collection/components/form/form-date-time/form-date-time.constant.js +30 -0
- package/dist/collection/components/form/form-date-time/form-date-time.js +4 -2
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +2 -2
- package/dist/collection/components/grid/grid/grid.js +1 -1
- package/dist/design-system/yoo-form-date-time.entry.js +33 -1
- package/dist/design-system/yoo-form-dynamic.entry.js +2 -2
- package/dist/design-system/yoo-grid.entry.js +1 -1
- package/dist/design-system/yoo-photo-editor.entry.js +20 -22
- package/dist/esm/yoo-form-date-time.entry.js +33 -1
- package/dist/esm/yoo-form-dynamic.entry.js +2 -2
- package/dist/esm/yoo-grid.entry.js +1 -1
- package/dist/esm/yoo-photo-editor.entry.js +20 -22
- package/dist/types/components/3.organisms/photo-editor/photo-editor.interfaces.d.ts +1 -4
- package/dist/types/components/form/form-date-time/form-date-time.constant.d.ts +30 -0
- package/package.json +1 -1
@@ -3817,7 +3817,7 @@ const YooFormDynamicComponent = class {
|
|
3817
3817
|
};
|
3818
3818
|
break;
|
3819
3819
|
case index.FormFieldType.textarea:
|
3820
|
-
if (field.useRichText || ((field.language === 'html' || field.language === 'html-simple') && (index$1.isWeb(this.host) || readonly))) {
|
3820
|
+
if (!index$1.isSurface() && (field.useRichText || ((field.language === 'html' || field.language === 'html-simple') && (index$1.isWeb(this.host) || readonly)))) {
|
3821
3821
|
TagType = 'yoo-form-text-editor';
|
3822
3822
|
}
|
3823
3823
|
else {
|
@@ -2928,7 +2928,7 @@ const YooGridComponent = class {
|
|
2928
2928
|
index.h("slot", { name: "header" }),
|
2929
2929
|
index$1.isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && index.h("div", { class: `gradient-overlay left ${this.extraClass}` }),
|
2930
2930
|
index.h("slot", { name: "before" }),
|
2931
|
-
index.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 :
|
2931
|
+
index.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 :
|
2932
2932
|
_d.map((item, index$1) => (index.h("yoo-ion-slide", { class: slideClass }, index.h("div", { ref: (el) => (this.itemSlideDiv = el), class: "slide" }, this.renderEntity(item, null, index$1))))), emptySlides),
|
2933
2933
|
index$1.isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && index.h("div", { class: `gradient-overlay right ${this.extraClass}` }),
|
2934
2934
|
index.h("slot", { name: "after" })
|
@@ -870,24 +870,22 @@ const YooPhotoEditorComponent = class {
|
|
870
870
|
const startDraw = (ev) => {
|
871
871
|
if (ev && this.isDrawMode) {
|
872
872
|
this.hasImageBeenCleaned = false;
|
873
|
-
|
874
|
-
drawCoordinates = { current: { x, y } };
|
873
|
+
drawCoordinates = annotationsHelpers.getPointerCoordinates(ev, this.canvasDrawingsElement);
|
875
874
|
this.canvasContext.beginPath();
|
876
|
-
this.canvasContext.
|
875
|
+
this.canvasContext.lineWidth = this.size;
|
876
|
+
this.canvasContext.strokeStyle = index$1.getCssColor(this.color, this.color);
|
877
|
+
this.canvasContext.lineCap = 'round';
|
878
|
+
this.canvasContext.lineJoin = 'round';
|
879
|
+
this.canvasContext.moveTo(drawCoordinates.x, drawCoordinates.y);
|
877
880
|
isDrawing = true;
|
878
881
|
}
|
879
882
|
};
|
880
883
|
const draw = (ev) => {
|
881
|
-
if (ev && this.isDrawMode && drawCoordinates &&
|
884
|
+
if (ev && this.isDrawMode && isDrawing && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.x) && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.y)) {
|
882
885
|
ev.stopPropagation();
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
this.canvasContext.lineTo(coords.x, coords.y);
|
887
|
-
this.canvasContext.strokeStyle = index$1.getCssColor(this.color, this.color);
|
888
|
-
this.canvasContext.lineCap = 'round';
|
889
|
-
this.canvasContext.stroke();
|
890
|
-
}
|
886
|
+
drawCoordinates = annotationsHelpers.getPointerCoordinates(ev, this.canvasDrawingsElement);
|
887
|
+
this.canvasContext.lineTo(drawCoordinates.x, drawCoordinates.y);
|
888
|
+
this.canvasContext.stroke();
|
891
889
|
}
|
892
890
|
};
|
893
891
|
const stopDraw = (ev) => {
|
@@ -901,19 +899,19 @@ const YooPhotoEditorComponent = class {
|
|
901
899
|
this.canvasContext.closePath();
|
902
900
|
}
|
903
901
|
};
|
904
|
-
|
905
|
-
|
906
|
-
this.canvasDrawingsElement.
|
907
|
-
this.canvasDrawingsElement.
|
908
|
-
this.canvasDrawingsElement.onmouseup = stopDraw;
|
909
|
-
this.canvasDrawingsElement.onmouseleave = stopDraw;
|
902
|
+
if (window.navigator.maxTouchPoints) {
|
903
|
+
this.canvasDrawingsElement.addEventListener('touchstart', startDraw);
|
904
|
+
this.canvasDrawingsElement.addEventListener('touchmove', draw);
|
905
|
+
this.canvasDrawingsElement.addEventListener('touchend', stopDraw);
|
910
906
|
}
|
911
907
|
else {
|
912
|
-
|
913
|
-
|
914
|
-
['
|
915
|
-
['touchend', 'pointerup'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
|
908
|
+
this.canvasDrawingsElement.addEventListener('mousedown', startDraw);
|
909
|
+
this.canvasDrawingsElement.addEventListener('mousemove', draw);
|
910
|
+
['mouseup', 'mouseleave'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
|
916
911
|
}
|
912
|
+
this.canvasDrawingsElement.addEventListener('pointerdown', startDraw);
|
913
|
+
this.canvasDrawingsElement.addEventListener('pointermove', draw);
|
914
|
+
this.canvasDrawingsElement.addEventListener('pointerup', stopDraw);
|
917
915
|
}
|
918
916
|
}
|
919
917
|
updateAnnotationStyle(styleAttr, styleValue) {
|
@@ -684,24 +684,22 @@ export class YooPhotoEditorComponent {
|
|
684
684
|
const startDraw = (ev) => {
|
685
685
|
if (ev && this.isDrawMode) {
|
686
686
|
this.hasImageBeenCleaned = false;
|
687
|
-
|
688
|
-
drawCoordinates = { current: { x, y } };
|
687
|
+
drawCoordinates = getPointerCoordinates(ev, this.canvasDrawingsElement);
|
689
688
|
this.canvasContext.beginPath();
|
690
|
-
this.canvasContext.
|
689
|
+
this.canvasContext.lineWidth = this.size;
|
690
|
+
this.canvasContext.strokeStyle = getCssColor(this.color, this.color);
|
691
|
+
this.canvasContext.lineCap = 'round';
|
692
|
+
this.canvasContext.lineJoin = 'round';
|
693
|
+
this.canvasContext.moveTo(drawCoordinates.x, drawCoordinates.y);
|
691
694
|
isDrawing = true;
|
692
695
|
}
|
693
696
|
};
|
694
697
|
const draw = (ev) => {
|
695
|
-
if (ev && this.isDrawMode && drawCoordinates &&
|
698
|
+
if (ev && this.isDrawMode && isDrawing && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.x) && (drawCoordinates === null || drawCoordinates === void 0 ? void 0 : drawCoordinates.y)) {
|
696
699
|
ev.stopPropagation();
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
this.canvasContext.lineTo(coords.x, coords.y);
|
701
|
-
this.canvasContext.strokeStyle = getCssColor(this.color, this.color);
|
702
|
-
this.canvasContext.lineCap = 'round';
|
703
|
-
this.canvasContext.stroke();
|
704
|
-
}
|
700
|
+
drawCoordinates = getPointerCoordinates(ev, this.canvasDrawingsElement);
|
701
|
+
this.canvasContext.lineTo(drawCoordinates.x, drawCoordinates.y);
|
702
|
+
this.canvasContext.stroke();
|
705
703
|
}
|
706
704
|
};
|
707
705
|
const stopDraw = (ev) => {
|
@@ -715,19 +713,19 @@ export class YooPhotoEditorComponent {
|
|
715
713
|
this.canvasContext.closePath();
|
716
714
|
}
|
717
715
|
};
|
718
|
-
|
719
|
-
|
720
|
-
this.canvasDrawingsElement.
|
721
|
-
this.canvasDrawingsElement.
|
722
|
-
this.canvasDrawingsElement.onmouseup = stopDraw;
|
723
|
-
this.canvasDrawingsElement.onmouseleave = stopDraw;
|
716
|
+
if (window.navigator.maxTouchPoints) {
|
717
|
+
this.canvasDrawingsElement.addEventListener('touchstart', startDraw);
|
718
|
+
this.canvasDrawingsElement.addEventListener('touchmove', draw);
|
719
|
+
this.canvasDrawingsElement.addEventListener('touchend', stopDraw);
|
724
720
|
}
|
725
721
|
else {
|
726
|
-
|
727
|
-
|
728
|
-
['
|
729
|
-
['touchend', 'pointerup'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
|
722
|
+
this.canvasDrawingsElement.addEventListener('mousedown', startDraw);
|
723
|
+
this.canvasDrawingsElement.addEventListener('mousemove', draw);
|
724
|
+
['mouseup', 'mouseleave'].forEach((evName) => this.canvasDrawingsElement.addEventListener(evName, stopDraw));
|
730
725
|
}
|
726
|
+
this.canvasDrawingsElement.addEventListener('pointerdown', startDraw);
|
727
|
+
this.canvasDrawingsElement.addEventListener('pointermove', draw);
|
728
|
+
this.canvasDrawingsElement.addEventListener('pointerup', stopDraw);
|
731
729
|
}
|
732
730
|
}
|
733
731
|
updateAnnotationStyle(styleAttr, styleValue) {
|
@@ -0,0 +1,30 @@
|
|
1
|
+
export const LANGUAGES = {
|
2
|
+
ar: 'ar',
|
3
|
+
bg: 'bg',
|
4
|
+
cz: 'cs',
|
5
|
+
zht: 'zh',
|
6
|
+
zhs: 'zh',
|
7
|
+
zhk: 'zh',
|
8
|
+
ca: 'en',
|
9
|
+
nl: 'nl',
|
10
|
+
en: 'en',
|
11
|
+
us: 'en',
|
12
|
+
de: 'de',
|
13
|
+
el: 'el',
|
14
|
+
es: 'es',
|
15
|
+
fr: 'fr',
|
16
|
+
he: 'he',
|
17
|
+
hu: 'hu',
|
18
|
+
it: 'it',
|
19
|
+
ja: 'ja',
|
20
|
+
kr: 'ko',
|
21
|
+
pl: 'pl',
|
22
|
+
br: 'pt-BR',
|
23
|
+
pt: 'pt-PT',
|
24
|
+
ro: 'ro',
|
25
|
+
ru: 'ru',
|
26
|
+
sk: 'sk',
|
27
|
+
th: 'th',
|
28
|
+
tr: 'tr',
|
29
|
+
ua: 'ua'
|
30
|
+
};
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { datepicker } from '@mobiscroll/javascript';
|
2
|
-
import { dateFormat, endOf, findDevice, getUUID, getWeekStart, isWeb, startOf, translate } from '@shared/utils';
|
1
|
+
import { datepicker, locale } from '@mobiscroll/javascript';
|
2
|
+
import { dateFormat, endOf, findDevice, getCurrentLanguage, getUUID, getWeekStart, isWeb, startOf, translate } from '@shared/utils';
|
3
3
|
import { h } from '@stencil/core';
|
4
4
|
import { convertValueForInputType, setValidator, setValueAndValidateInput, validate } from '@yobi/utils/helpers/form-input-helpers';
|
5
5
|
import { destroyMountPoints, generateRandomMountElementId, initShadowMountPoints } from '@yobi/utils/helpers/shadow-dom-helper';
|
6
|
+
import { LANGUAGES } from './form-date-time.constant';
|
6
7
|
const DISPLAY = {
|
7
8
|
date: ['calendar'],
|
8
9
|
'datetime-local': ['calendar', 'time'],
|
@@ -91,6 +92,7 @@ export class YooFormDateTimeComponent {
|
|
91
92
|
displayTimezone: 'local',
|
92
93
|
dataTimezone: 'utc',
|
93
94
|
showOnFocus: false,
|
95
|
+
locale: locale[LANGUAGES[getCurrentLanguage()]] || locale['en'],
|
94
96
|
...(this.hoursOnly && { stepMinute: 60 }),
|
95
97
|
...(this.hoursOnly && { timeWheels: `|${this.timeFormat}|` }),
|
96
98
|
...(this.pages && { pages: this.pages }),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FormFieldType, IncentivePartType, QUIZZ_COMPONENTS_FORM_FIELDS } from '@shared/interfaces';
|
2
|
-
import { answerIsValid, cancelRequestInterval, closeModal, debounce, disableKeyboardResize, dispatchCustomEvent, enableKeyboardResize, evalInContext, extractTextFromStringHTML, findField, findParent, getConfidenceDescriptionKey, getConfidenceEmoji, getCssColor, getDistance, getFieldReplacement, getFieldValue, getModalAnimation, getSession, hasValue, isAndroid, isAnimationsDisabled, isChromeForIos, isConfidenceAssessment, isContentOnly, isFieldWithDirectValue, isFieldWithNoValue, isIonic, isIOS, isIphoneX, isKeyboardResizeModeInactive, isNativeMobile, isPhotoOrMultiPhotosField, isQuiz, isSafari, isSamsung, isTimedQuiz, isTranslationKey, isValueATranslationKey, isVisible, isWeb, pipes, requestInterval, sanitizeInputValue, showContextMenu, showModal, showToast, slenderizeObject, translate, translateMulti, updateDatasetFilters } from '@shared/utils';
|
2
|
+
import { answerIsValid, cancelRequestInterval, closeModal, debounce, disableKeyboardResize, dispatchCustomEvent, enableKeyboardResize, evalInContext, extractTextFromStringHTML, findField, findParent, getConfidenceDescriptionKey, getConfidenceEmoji, getCssColor, getDistance, getFieldReplacement, getFieldValue, getModalAnimation, getSession, hasValue, isAndroid, isAnimationsDisabled, isChromeForIos, isConfidenceAssessment, isContentOnly, isFieldWithDirectValue, isFieldWithNoValue, isIonic, isIOS, isIphoneX, isKeyboardResizeModeInactive, isNativeMobile, isPhotoOrMultiPhotosField, isQuiz, isSafari, isSamsung, isSurface, isTimedQuiz, isTranslationKey, isValueATranslationKey, isVisible, isWeb, pipes, requestInterval, sanitizeInputValue, showContextMenu, showModal, showToast, slenderizeObject, translate, translateMulti, updateDatasetFilters } from '@shared/utils';
|
3
3
|
import { forceUpdate, h, Host } from '@stencil/core';
|
4
4
|
import { getMissionStatusIconName } from '@yobi/feature-operate/campaign/helpers/operation-helpers';
|
5
5
|
import { getActiveElementShadow, getAppContext, lockSwipes, querySelectorAllDeep, querySelectorDeep } from '@yobi/utils/helpers/common-helpers';
|
@@ -3606,7 +3606,7 @@ export class YooFormDynamicComponent {
|
|
3606
3606
|
};
|
3607
3607
|
break;
|
3608
3608
|
case FormFieldType.textarea:
|
3609
|
-
if (field.useRichText || ((field.language === 'html' || field.language === 'html-simple') && (isWeb(this.host) || readonly))) {
|
3609
|
+
if (!isSurface() && (field.useRichText || ((field.language === 'html' || field.language === 'html-simple') && (isWeb(this.host) || readonly)))) {
|
3610
3610
|
TagType = 'yoo-form-text-editor';
|
3611
3611
|
}
|
3612
3612
|
else {
|
@@ -2845,7 +2845,7 @@ export class YooGridComponent {
|
|
2845
2845
|
h("slot", { name: "header" }),
|
2846
2846
|
isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && h("div", { class: `gradient-overlay left ${this.extraClass}` }),
|
2847
2847
|
h("slot", { name: "before" }),
|
2848
|
-
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 :
|
2848
|
+
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 :
|
2849
2849
|
_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),
|
2850
2850
|
isWeb(this.host) && this.entityType !== 'plans' && !this.withoutGradient && h("div", { class: `gradient-overlay right ${this.extraClass}` }),
|
2851
2851
|
h("slot", { name: "after" })
|