@yoobic/yobi 8.6.31 → 8.6.33
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/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-form-creator-translate-dialog.cjs.entry.js +6 -4
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +2 -2
- package/dist/cjs/yoo-form-phone-number.cjs.entry.js +5 -1
- package/dist/cjs/yoo-form-text-editor.cjs.entry.js +18 -1
- package/dist/collection/components/form/form-dynamic/form-dynamic.css +9 -1
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +1 -1
- package/dist/collection/components/form/form-phone-number/form-phone-number.js +19 -1
- package/dist/collection/components/form/form-text-editor/form-text-editor.js +50 -3
- package/dist/collection/components/form-creator/form-creator-translate-dialog/form-creator-translate-dialog.js +6 -4
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-creator-translate-dialog.entry.js +6 -4
- package/dist/design-system/yoo-form-dynamic.entry.js +2 -2
- package/dist/design-system/yoo-form-phone-number.entry.js +5 -1
- package/dist/design-system/yoo-form-text-editor.entry.js +19 -2
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-creator-translate-dialog.entry.js +6 -4
- package/dist/esm/yoo-form-dynamic.entry.js +2 -2
- package/dist/esm/yoo-form-phone-number.entry.js +5 -1
- package/dist/esm/yoo-form-text-editor.entry.js +19 -2
- package/dist/types/components/form/form-phone-number/form-phone-number.d.ts +4 -0
- package/dist/types/components/form/form-text-editor/form-text-editor.d.ts +5 -0
- package/dist/types/components.d.ts +5 -0
- package/package.json +1 -1
@@ -47,7 +47,7 @@ import 'froala-editor/js/languages/uk';
|
|
47
47
|
import 'froala-editor/js/languages/zh_cn';
|
48
48
|
import 'froala-editor/js/languages/zh_tw';
|
49
49
|
import 'froala-editor/js/languages/vi';
|
50
|
-
import { asyncWaterfall, closeModal, debounce as _debounce, debounce, getAsyncExtraData, getColorSwatches, getCurrentLanguage, getCustomApp, getSession, getUserDisplayName, getUUID, getVideoPoster, images, isCloudinaryLink, isImageUrl, isIOS, isSafari, isVideo, isWeb, replaceAtTagToMentionTag, showContextMenu, showModal, translate, translateMulti, updateLinkPreviews, videos } from '@shared/utils';
|
50
|
+
import { asyncWaterfall, closeModal, debounce as _debounce, debounce, getAsyncExtraData, getColorSwatches, getCurrentLanguage, getCustomApp, getSession, getUserDisplayName, getUUID, getVideoPoster, images, isAndroid, isCloudinaryLink, isImageUrl, isIOS, isSafari, isVideo, isWeb, replaceAtTagToMentionTag, showContextMenu, showModal, translate, translateMulti, updateLinkPreviews, videos } from '@shared/utils';
|
51
51
|
import { h, Host } from '@stencil/core';
|
52
52
|
import { getAppContext, querySelectorDeep, removeHtmlFromString } from '@yobi/utils/helpers/common-helpers';
|
53
53
|
import { sanitizeMentionTag } from '@yobi/utils/helpers/entities-helpers';
|
@@ -57,6 +57,7 @@ import { destroyMountPoints, generateRandomMountElementId, initShadowMountPoints
|
|
57
57
|
import FroalaEditor from 'froala-editor';
|
58
58
|
import { assign, compact, isArray, isString } from 'lodash-es';
|
59
59
|
import sanitizeHtml from 'sanitize-html';
|
60
|
+
const PADDING = 32;
|
60
61
|
export class YooFormTextEditorComponent {
|
61
62
|
constructor() {
|
62
63
|
// the event "contentChanged" is not fired before hitting 'Enter' once,
|
@@ -91,6 +92,7 @@ export class YooFormTextEditorComponent {
|
|
91
92
|
this.isFieldCollapsed = false;
|
92
93
|
this.mentionText = '';
|
93
94
|
this.isMentionMode = false;
|
95
|
+
this.keyboardOpen = false;
|
94
96
|
}
|
95
97
|
get mount() {
|
96
98
|
return document.getElementById(this.mountId);
|
@@ -115,6 +117,7 @@ export class YooFormTextEditorComponent {
|
|
115
117
|
else {
|
116
118
|
this.blockHTMLReset = false;
|
117
119
|
}
|
120
|
+
this.inputResize.emit();
|
118
121
|
}
|
119
122
|
}
|
120
123
|
onMentionUsersChanged() {
|
@@ -187,6 +190,16 @@ export class YooFormTextEditorComponent {
|
|
187
190
|
(_a = this.mentionDialog) === null || _a === void 0 ? void 0 : _a.remove();
|
188
191
|
this.destroyEditor();
|
189
192
|
}
|
193
|
+
onKeyboardShown() {
|
194
|
+
this.keyboardOpen = true;
|
195
|
+
const wrapper = this.mount.querySelector('.fr-wrapper');
|
196
|
+
wrapper && (wrapper.style.maxHeight = isAndroid() ? '80px' : '96px');
|
197
|
+
}
|
198
|
+
onKeyboardHidden() {
|
199
|
+
this.keyboardOpen = false;
|
200
|
+
const wrapper = this.mount.querySelector('.fr-wrapper');
|
201
|
+
wrapper && (wrapper.style.maxHeight = this.maxHeight ? `${this.maxHeight + PADDING}px` : '500px');
|
202
|
+
}
|
190
203
|
destroyEditor() {
|
191
204
|
var _a;
|
192
205
|
if ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.destroy) {
|
@@ -273,7 +286,7 @@ export class YooFormTextEditorComponent {
|
|
273
286
|
placeholderText: translate(this.placeholder),
|
274
287
|
toolbarSticky: false,
|
275
288
|
requestHeaders: { Authorization: 'Bearer ' + (session === null || session === void 0 ? void 0 : session.token) },
|
276
|
-
heightMax: this.isFullscreen ? '100%' : this.maxHeight ||
|
289
|
+
heightMax: this.isFullscreen ? '100%' : this.maxHeight + PADDING || '500px',
|
277
290
|
heightMin: this.isFullscreen ? '100%' : this.minHeight || 120,
|
278
291
|
emoticonsUseImage: false,
|
279
292
|
imageUploadParam: 'file',
|
@@ -478,6 +491,9 @@ export class YooFormTextEditorComponent {
|
|
478
491
|
ev.preventDefault();
|
479
492
|
(_a = this.editor) === null || _a === void 0 ? void 0 : _a.events.focus();
|
480
493
|
}
|
494
|
+
},
|
495
|
+
'focus': () => {
|
496
|
+
this.inputFocused.emit({ host: this.host });
|
481
497
|
}
|
482
498
|
}
|
483
499
|
};
|
@@ -1359,7 +1375,8 @@ export class YooFormTextEditorComponent {
|
|
1359
1375
|
static get states() {
|
1360
1376
|
return {
|
1361
1377
|
"mentionText": {},
|
1362
|
-
"isMentionMode": {}
|
1378
|
+
"isMentionMode": {},
|
1379
|
+
"keyboardOpen": {}
|
1363
1380
|
};
|
1364
1381
|
}
|
1365
1382
|
static get events() {
|
@@ -1423,6 +1440,21 @@ export class YooFormTextEditorComponent {
|
|
1423
1440
|
"resolved": "any",
|
1424
1441
|
"references": {}
|
1425
1442
|
}
|
1443
|
+
}, {
|
1444
|
+
"method": "inputResize",
|
1445
|
+
"name": "inputResize",
|
1446
|
+
"bubbles": true,
|
1447
|
+
"cancelable": true,
|
1448
|
+
"composed": true,
|
1449
|
+
"docs": {
|
1450
|
+
"tags": [],
|
1451
|
+
"text": ""
|
1452
|
+
},
|
1453
|
+
"complexType": {
|
1454
|
+
"original": "void",
|
1455
|
+
"resolved": "void",
|
1456
|
+
"references": {}
|
1457
|
+
}
|
1426
1458
|
}, {
|
1427
1459
|
"method": "linkPreviewChanged",
|
1428
1460
|
"name": "linkPreviewChanged",
|
@@ -1540,4 +1572,19 @@ export class YooFormTextEditorComponent {
|
|
1540
1572
|
"methodName": "mentionModeChanged"
|
1541
1573
|
}];
|
1542
1574
|
}
|
1575
|
+
static get listeners() {
|
1576
|
+
return [{
|
1577
|
+
"name": "keyboardDidShow",
|
1578
|
+
"method": "onKeyboardShown",
|
1579
|
+
"target": "window",
|
1580
|
+
"capture": false,
|
1581
|
+
"passive": false
|
1582
|
+
}, {
|
1583
|
+
"name": "keyboardWillHide",
|
1584
|
+
"method": "onKeyboardHidden",
|
1585
|
+
"target": "window",
|
1586
|
+
"capture": false,
|
1587
|
+
"passive": false
|
1588
|
+
}];
|
1589
|
+
}
|
1543
1590
|
}
|
@@ -27,7 +27,7 @@ export class YooFormCreatorTranslateDialogComponent {
|
|
27
27
|
const updatedTranslation = { ...event.detail };
|
28
28
|
delete updatedTranslation.name;
|
29
29
|
this.updateCurrentTranslations(updatedTranslation, name);
|
30
|
-
},
|
30
|
+
}, 2000);
|
31
31
|
this.preventFormUpdate = false;
|
32
32
|
this.slides = undefined;
|
33
33
|
this.plan = undefined;
|
@@ -65,9 +65,11 @@ export class YooFormCreatorTranslateDialogComponent {
|
|
65
65
|
}
|
66
66
|
}
|
67
67
|
async forceUpdateTranslations() {
|
68
|
-
this.
|
69
|
-
|
70
|
-
|
68
|
+
if (!this.editableForm) {
|
69
|
+
this.updatedTranslations = this.translations;
|
70
|
+
this.preventFormUpdate = false;
|
71
|
+
this.updateTranslationForms(true);
|
72
|
+
}
|
71
73
|
}
|
72
74
|
componentWillLoad() {
|
73
75
|
this.updatedTranslations = this.translations;
|