@yoobic/yobi 7.7.40 → 7.7.44

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.
Files changed (126) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/{draggable-tags-helpers-b353ad65.js → draggable-tags-helpers-557e8f4c.js} +21 -20
  3. package/dist/cjs/{form-helpers-b1514b99.js → form-helpers-6b5129aa.js} +2 -8
  4. package/dist/cjs/{grid-renderers-75f5517f.js → grid-renderers-443a0f25.js} +10 -2
  5. package/dist/cjs/index.cjs.js +4 -3
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{operation-helpers-14994f09.js → operation-helpers-fd31a44e.js} +7 -7
  8. package/dist/cjs/string-helpers-4852718a.js +14 -0
  9. package/dist/cjs/yoo-action-sheet-controller_15.cjs.entry.js +7 -5
  10. package/dist/cjs/yoo-ag-grid_96.cjs.entry.js +48 -8
  11. package/dist/cjs/yoo-camera-preview-dialog_7.cjs.entry.js +2 -1
  12. package/dist/cjs/yoo-campaign-heading.cjs.entry.js +1 -1
  13. package/dist/cjs/yoo-card-list-image_12.cjs.entry.js +4 -3
  14. package/dist/cjs/yoo-entity-search.cjs.entry.js +2 -2
  15. package/dist/cjs/yoo-form-categorize-words.cjs.entry.js +1 -1
  16. package/dist/cjs/yoo-form-choice_4.cjs.entry.js +1 -1
  17. package/dist/cjs/yoo-form-connect.cjs.entry.js +204 -323
  18. package/dist/cjs/yoo-form-creator-translate-dialog.cjs.entry.js +9 -7
  19. package/dist/cjs/yoo-form-image-tagging.cjs.entry.js +23 -15
  20. package/dist/cjs/yoo-form-json.cjs.entry.js +2 -1
  21. package/dist/cjs/yoo-form-missing-word.cjs.entry.js +1 -1
  22. package/dist/cjs/yoo-form-product-batch.cjs.entry.js +1 -1
  23. package/dist/cjs/yoo-form-ranking.cjs.entry.js +1 -1
  24. package/dist/cjs/yoo-form-swipe-cards.cjs.entry.js +1 -1
  25. package/dist/cjs/yoo-form-text-editor.cjs.entry.js +1 -0
  26. package/dist/cjs/yoo-form-todo-single.cjs.entry.js +1 -1
  27. package/dist/cjs/yoo-mission-heading_3.cjs.entry.js +1 -1
  28. package/dist/cjs/yoo-mission-results.cjs.entry.js +1 -1
  29. package/dist/cjs/yoo-mission-todo.cjs.entry.js +1 -1
  30. package/dist/collection/components/1.atoms/loader/loader.css +12 -0
  31. package/dist/collection/components/1.atoms/markdown/markdown.js +20 -1
  32. package/dist/collection/components/entities/card-list/card-list.css +6 -0
  33. package/dist/collection/components/entities/entity/entity.js +2 -1
  34. package/dist/collection/components/entities/entity-search/entity-search.css +4 -0
  35. package/dist/collection/components/entities/entity-search/entity-search.js +2 -2
  36. package/dist/collection/components/form/form-connect/form-connect.css +35 -33
  37. package/dist/collection/components/form/form-connect/form-connect.js +207 -375
  38. package/dist/collection/components/form/form-connect/types/index.js +1 -1
  39. package/dist/collection/components/form/form-dynamic/form-dynamic.js +42 -2
  40. package/dist/collection/components/form/form-image-tagging/form-image-tagging.js +41 -16
  41. package/dist/collection/components/form/form-text-editor/form-text-editor.js +1 -0
  42. package/dist/collection/components/form-creator/form-creator-translate-dialog/form-creator-translate-dialog.js +9 -8
  43. package/dist/collection/components/grid/ag-grid/grid-renderers.js +8 -0
  44. package/dist/collection/components/grid/grid/grid.js +41 -1
  45. package/dist/collection/utils/helpers/draggable-tags-helpers.js +21 -20
  46. package/dist/collection/utils/helpers/operation-helpers.js +7 -7
  47. package/dist/design-system/design-system.esm.js +1 -1
  48. package/dist/design-system/index.esm.js +1 -1
  49. package/dist/design-system/{p-72b027cd.entry.js → p-08c3e5e4.entry.js} +1 -1
  50. package/dist/design-system/{p-d5b214f0.entry.js → p-1527ca6a.entry.js} +1 -1
  51. package/dist/design-system/{p-8214c671.js → p-17ca9bca.js} +1 -1
  52. package/dist/design-system/{p-f013d119.entry.js → p-2ed44cf9.entry.js} +1 -1
  53. package/dist/design-system/p-3379386f.entry.js +1 -0
  54. package/dist/design-system/p-3cf42f38.js +1 -0
  55. package/dist/design-system/{p-800cb056.entry.js → p-434dbb2f.entry.js} +1 -1
  56. package/dist/design-system/{p-303c3c22.entry.js → p-46981663.entry.js} +1 -1
  57. package/dist/design-system/{p-8055dcaf.entry.js → p-4a7ab005.entry.js} +1 -1
  58. package/dist/design-system/p-5062d1e2.entry.js +1 -0
  59. package/dist/design-system/p-51cd61bd.entry.js +1 -0
  60. package/dist/design-system/p-5450cf9b.js +1 -0
  61. package/dist/design-system/{p-619154de.entry.js → p-56f8a567.entry.js} +1 -1
  62. package/dist/design-system/p-623e854e.entry.js +1 -0
  63. package/dist/design-system/{p-d17b376e.entry.js → p-687dec7e.entry.js} +1 -1
  64. package/dist/design-system/{p-6dab9545.entry.js → p-6ddf846e.entry.js} +1 -1
  65. package/dist/design-system/p-716336bf.js +1 -0
  66. package/dist/design-system/p-8d5254c0.js +1 -0
  67. package/dist/design-system/p-9a993e45.entry.js +1 -0
  68. package/dist/design-system/p-ba32098a.entry.js +1 -0
  69. package/dist/design-system/{p-47077c2f.entry.js → p-c82876d6.entry.js} +1 -1
  70. package/dist/design-system/{p-5a4a35ae.entry.js → p-ddd372bb.entry.js} +1 -1
  71. package/dist/design-system/{p-1d437750.entry.js → p-e3cc14ba.entry.js} +3 -3
  72. package/dist/design-system/{p-4a323ffb.entry.js → p-e560bd90.entry.js} +1 -1
  73. package/dist/design-system/{p-1b60268b.entry.js → p-e960fda6.entry.js} +1 -1
  74. package/dist/design-system/p-f31faeba.entry.js +1 -0
  75. package/dist/esm/design-system.js +1 -1
  76. package/dist/esm/{draggable-tags-helpers-e3b9cd11.js → draggable-tags-helpers-a9a159b2.js} +21 -20
  77. package/dist/esm/{form-helpers-6f30100d.js → form-helpers-a68bb5a2.js} +1 -7
  78. package/dist/esm/{grid-renderers-3920dbf1.js → grid-renderers-3e052fa0.js} +10 -2
  79. package/dist/esm/index.js +4 -3
  80. package/dist/esm/loader.js +1 -1
  81. package/dist/esm/{operation-helpers-86666c74.js → operation-helpers-4c9210d3.js} +7 -7
  82. package/dist/esm/string-helpers-9646d8e3.js +11 -0
  83. package/dist/esm/yoo-action-sheet-controller_15.entry.js +7 -5
  84. package/dist/esm/yoo-ag-grid_96.entry.js +48 -8
  85. package/dist/esm/yoo-camera-preview-dialog_7.entry.js +2 -1
  86. package/dist/esm/yoo-campaign-heading.entry.js +1 -1
  87. package/dist/esm/yoo-card-list-image_12.entry.js +4 -3
  88. package/dist/esm/yoo-entity-search.entry.js +3 -3
  89. package/dist/esm/yoo-form-categorize-words.entry.js +1 -1
  90. package/dist/esm/yoo-form-choice_4.entry.js +1 -1
  91. package/dist/esm/yoo-form-connect.entry.js +206 -325
  92. package/dist/esm/yoo-form-creator-translate-dialog.entry.js +10 -8
  93. package/dist/esm/yoo-form-image-tagging.entry.js +24 -16
  94. package/dist/esm/yoo-form-json.entry.js +2 -1
  95. package/dist/esm/yoo-form-missing-word.entry.js +1 -1
  96. package/dist/esm/yoo-form-product-batch.entry.js +1 -1
  97. package/dist/esm/yoo-form-ranking.entry.js +1 -1
  98. package/dist/esm/yoo-form-swipe-cards.entry.js +1 -1
  99. package/dist/esm/yoo-form-text-editor.entry.js +1 -0
  100. package/dist/esm/yoo-form-todo-single.entry.js +1 -1
  101. package/dist/esm/yoo-mission-heading_3.entry.js +1 -1
  102. package/dist/esm/yoo-mission-results.entry.js +1 -1
  103. package/dist/esm/yoo-mission-todo.entry.js +1 -1
  104. package/dist/types/components/1.atoms/markdown/markdown.d.ts +1 -0
  105. package/dist/types/components/form/form-connect/form-connect.d.ts +31 -48
  106. package/dist/types/components/form/form-connect/types/index.d.ts +4 -5
  107. package/dist/types/components/form/form-dynamic/form-dynamic.d.ts +1 -0
  108. package/dist/types/components/form/form-image-tagging/form-image-tagging.d.ts +7 -4
  109. package/dist/types/components/form-creator/form-creator-translate-dialog/form-creator-translate-dialog.d.ts +1 -2
  110. package/dist/types/components/grid/grid/grid.d.ts +1 -0
  111. package/dist/types/components.d.ts +6 -9
  112. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/file/file.interface.d.ts +1 -0
  113. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/mission-description/mission-description.interface.d.ts +2 -2
  114. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/services/async-extra-data/async-extra-data.interface.d.ts +1 -1
  115. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/utils/src/helpers/string-helpers.d.ts +1 -0
  116. package/package.json +1 -1
  117. package/dist/design-system/p-15699698.entry.js +0 -1
  118. package/dist/design-system/p-3ea3dc83.js +0 -1
  119. package/dist/design-system/p-72fe82e5.js +0 -1
  120. package/dist/design-system/p-8cfecc25.entry.js +0 -1
  121. package/dist/design-system/p-983e8f1b.js +0 -1
  122. package/dist/design-system/p-98bf6e13.entry.js +0 -1
  123. package/dist/design-system/p-aaf4c6a2.entry.js +0 -1
  124. package/dist/design-system/p-ab3cb64c.entry.js +0 -1
  125. package/dist/design-system/p-adbb882f.entry.js +0 -1
  126. package/dist/design-system/p-ef1e0f03.entry.js +0 -1
@@ -1 +1 @@
1
- export {};
1
+ export const CONNECT_TYPES = ['draggable', 'connectable'];
@@ -287,6 +287,18 @@ export class YooFormDynamicComponent {
287
287
  }
288
288
  }
289
289
  }
290
+ async resetCurrentPage(field) {
291
+ const el = this.getFieldByCode(field.name);
292
+ if (el) {
293
+ switch (field.type) {
294
+ case FormFieldType.grid: {
295
+ const grid = el;
296
+ grid.resetCurrentPage();
297
+ break;
298
+ }
299
+ }
300
+ }
301
+ }
290
302
  async afterFetchCustomData(field, data, options) {
291
303
  const el = this.getFieldByCode(field.name);
292
304
  if (el) {
@@ -375,11 +387,12 @@ export class YooFormDynamicComponent {
375
387
  }
376
388
  }
377
389
  async onSlideNext(skipEmitEvent = false) {
390
+ var _a;
378
391
  this.checkIfFirstSlideAndLockSwipePrev();
379
392
  if (!skipEmitEvent && this.isLesson() &&
380
393
  ((this.showAnswers && isQuiz(this.lessonType) && !isTimedQuiz(this.lessonType)) || isConfidenceAssesment(this.lessonType))) {
381
394
  const field = this.slides[this.activeIndex].items[0];
382
- let slideData = { index: this.activeIndex, field, data: this.data[field.name] };
395
+ let slideData = { index: this.activeIndex, field, data: (_a = this.data) === null || _a === void 0 ? void 0 : _a[field.name] };
383
396
  if (isConfidenceAssesment(this.lessonType)) {
384
397
  slideData = Object.assign(Object.assign({}, slideData), { showAnswers: this.showAnswers, hasFeedback: isConfidenceAssesment(this.lessonType) });
385
398
  }
@@ -3612,7 +3625,7 @@ export class YooFormDynamicComponent {
3612
3625
  'lesson-live-preview': this.isLessonPreview(),
3613
3626
  [field.type]: true
3614
3627
  };
3615
- return (markdown && h("yoo-markdown", { class: cssClass, style: { color: `${color}` }, linkPreviews: field.linkPreviews, content: translateMulti(pipes.https.transform(markdown)) }));
3628
+ return (markdown && h("yoo-markdown", { class: cssClass, isVisible: this.isCurrentSlide(slideIndex), style: { color: `${color}` }, linkPreviews: field.linkPreviews, content: translateMulti(pipes.https.transform(markdown)) }));
3616
3629
  }
3617
3630
  case FormFieldType.renderer:
3618
3631
  return field.handler && h("div", { innerHTML: field.handler(this.currentData, field, this.injector) });
@@ -3660,6 +3673,7 @@ export class YooFormDynamicComponent {
3660
3673
  answer: field.answer,
3661
3674
  image: field.image,
3662
3675
  annotations: field.annotations,
3676
+ isVisible: this.isCurrentSlide(slideIndex),
3663
3677
  slideIndex,
3664
3678
  livePreview: this.isLessonPreview()
3665
3679
  };
@@ -5666,6 +5680,32 @@ export class YooFormDynamicComponent {
5666
5680
  "tags": []
5667
5681
  }
5668
5682
  },
5683
+ "resetCurrentPage": {
5684
+ "complexType": {
5685
+ "signature": "(field: IFormField) => Promise<void>",
5686
+ "parameters": [{
5687
+ "tags": [],
5688
+ "text": ""
5689
+ }],
5690
+ "references": {
5691
+ "Promise": {
5692
+ "location": "global"
5693
+ },
5694
+ "IFormField": {
5695
+ "location": "import",
5696
+ "path": "@shared/interfaces"
5697
+ },
5698
+ "HTMLYooGridElement": {
5699
+ "location": "global"
5700
+ }
5701
+ },
5702
+ "return": "Promise<void>"
5703
+ },
5704
+ "docs": {
5705
+ "text": "",
5706
+ "tags": []
5707
+ }
5708
+ },
5669
5709
  "afterFetchCustomData": {
5670
5710
  "complexType": {
5671
5711
  "signature": "(field: IFormField, data: any, options?: any) => Promise<void>",
@@ -1,5 +1,5 @@
1
1
  import { getCssColor, translate, translateMulti } from '@shared/utils';
2
- import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
2
+ import { Component, Element, Event, forceUpdate, h, Host, Method, Prop, State, Watch } from '@stencil/core';
3
3
  import { checkArray, filterDuplicateEntries, getAppContext, getDroppedTagsValues, getNewValue, getPercentPositionStyle, getTagsValues, getTagZone, hasDuplicates, hasValuesChanged, initTags, initZones, isTagsZone, resetTags, setDynamicTagZoneHeight, setValueAndValidateInput, showWarningAlert } from '@utils';
4
4
  import { debounce } from 'lodash-es';
5
5
  const PERCENT_BASE = 100;
@@ -9,9 +9,6 @@ export class YooFormImageTaggingComponent {
9
9
  this.placeholder = 'DRAGDROPTAGS';
10
10
  this.zones = [];
11
11
  }
12
- async isValid() {
13
- this.validate();
14
- }
15
12
  onModalAnimationFinished(iaf) {
16
13
  if (iaf && this.zones.length && getTagZone(this.zones)) {
17
14
  setDynamicTagZoneHeight(getTagZone(this.zones).element);
@@ -20,6 +17,9 @@ export class YooFormImageTaggingComponent {
20
17
  onRequireChanged() {
21
18
  this.validate();
22
19
  }
20
+ onAnnotationsChanged() {
21
+ this.hasAnnotationsChanged = true;
22
+ }
23
23
  onValuesChanged(newValues, oldValues) {
24
24
  this.hasValuesChanged = false;
25
25
  const hasDuplicatedValues = hasDuplicates(newValues) === 1;
@@ -31,8 +31,16 @@ export class YooFormImageTaggingComponent {
31
31
  this.hasValuesChanged = true;
32
32
  }
33
33
  }
34
- onAnnotationsChanged() {
35
- this.hasAnnotationsChanged = true;
34
+ onIsVisibleChanged() {
35
+ // Timeout set here to reset the draggables in case of being
36
+ // in a slide to prevent the non-draggable tags issue
37
+ this.isVisible && setTimeout(() => {
38
+ this.shouldRender = true;
39
+ forceUpdate(this);
40
+ }, 150);
41
+ }
42
+ async isValid() {
43
+ this.validate();
36
44
  }
37
45
  componentWillLoad() {
38
46
  var _a;
@@ -45,16 +53,16 @@ export class YooFormImageTaggingComponent {
45
53
  }
46
54
  }
47
55
  componentDidUpdate() {
48
- if (this.livePreview && (this.hasValuesChanged || this.hasAnnotationsChanged)) {
56
+ if ((this.livePreview && (this.hasValuesChanged || this.hasAnnotationsChanged)) || this.shouldRender) {
57
+ this.shouldRender = false;
49
58
  this.initImageTagging();
50
59
  }
51
60
  }
52
61
  validate() {
53
- if (checkArray(this.annotations)) {
54
- this.validity = this.value.length === this.annotations.length;
55
- this.validityChanged.emit(this.validity);
56
- return this.validity;
57
- }
62
+ var _a, _b;
63
+ this.validity = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === ((_b = this.annotations) === null || _b === void 0 ? void 0 : _b.length);
64
+ this.validityChanged.emit(this.validity);
65
+ return this.validity;
58
66
  }
59
67
  initImageTagging() {
60
68
  if (this.image && this.outerContainerElement) {
@@ -93,7 +101,7 @@ export class YooFormImageTaggingComponent {
93
101
  newValue: this.newValue,
94
102
  zones: this.zones,
95
103
  isReadonly: this.readonly,
96
- shouldAnimateTags: !(this.readonly || this.livePreview),
104
+ shouldAnimateTags: !(this.readonly || this.livePreview || this.isVisible),
97
105
  shouldTruncateTagsValue: true,
98
106
  getColorTag: (tagValue) => this.getColorTag(tagValue),
99
107
  boundingElement: this.outerContainerElement,
@@ -365,6 +373,23 @@ export class YooFormImageTaggingComponent {
365
373
  "tags": [],
366
374
  "text": ""
367
375
  }
376
+ },
377
+ "isVisible": {
378
+ "type": "boolean",
379
+ "mutable": false,
380
+ "complexType": {
381
+ "original": "boolean",
382
+ "resolved": "boolean",
383
+ "references": {}
384
+ },
385
+ "required": false,
386
+ "optional": false,
387
+ "docs": {
388
+ "tags": [],
389
+ "text": ""
390
+ },
391
+ "attribute": "is-visible",
392
+ "reflect": false
368
393
  }
369
394
  }; }
370
395
  static get states() { return {
@@ -489,11 +514,11 @@ export class YooFormImageTaggingComponent {
489
514
  }, {
490
515
  "propName": "required",
491
516
  "methodName": "onRequireChanged"
492
- }, {
493
- "propName": "values",
494
- "methodName": "onValuesChanged"
495
517
  }, {
496
518
  "propName": "annotations",
497
519
  "methodName": "onAnnotationsChanged"
520
+ }, {
521
+ "propName": "values",
522
+ "methodName": "onValuesChanged"
498
523
  }]; }
499
524
  }
@@ -169,6 +169,7 @@ export class YooFormTextEditorComponent {
169
169
  quickInsertButtons: ['yooTemplateQuick', 'yooUploadButtonQuick', 'emoticons', 'ol', 'ul'],
170
170
  colorsBackground: ((_c = (_b = (_a = getSession()) === null || _a === void 0 ? void 0 : _a.tenant) === null || _b === void 0 ? void 0 : _b.rteColors) === null || _c === void 0 ? void 0 : _c.length) > 0 ? (_e = (_d = getSession()) === null || _d === void 0 ? void 0 : _d.tenant) === null || _e === void 0 ? void 0 : _e.rteColors : getColorSwatches(),
171
171
  colorsText: ((_h = (_g = (_f = getSession()) === null || _f === void 0 ? void 0 : _f.tenant) === null || _g === void 0 ? void 0 : _g.rteColors) === null || _h === void 0 ? void 0 : _h.length) > 0 ? (_k = (_j = getSession()) === null || _j === void 0 ? void 0 : _j.tenant) === null || _k === void 0 ? void 0 : _k.rteColors : getColorSwatches(),
172
+ imageEditButtons: ['imageReplace', 'imageAlign', 'imageRemove', '|', 'imageLink', 'linkOpen', 'linkEdit', 'linkRemove', '-', 'imageDisplay', 'imageStyle', 'imageSize'],
172
173
  toolbarButtons: {
173
174
  moreRich: {
174
175
  buttons: ['yooUploadButton', 'emoticons', 'insertImage', 'insertVideo', 'insertTable', 'insertLink', 'specialCharacters', 'insertFile', 'insertHR'],
@@ -4,7 +4,7 @@
4
4
  * Zeplin Link: https://zpl.io/aMj1PZd https://zpl.io/an7D5jv
5
5
  */
6
6
  import { COMPLEX_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES, FormFieldType, SINGLE_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES, TRANSLATABLE_FORM_FIELD_ATTRIBUTES } from '@shared/interfaces';
7
- import { closeModal, debounce, findField, formatSlides, getCurrentLanguage, getLocaleTranslation, translate, translateMulti } from '@shared/utils';
7
+ import { closeModal, debounce, findField, formatSlides, getCurrentLanguage, getLocaleTranslation, isHTML, translate, translateMulti } from '@shared/utils';
8
8
  import { Component, Event, h, Host, Method, Prop, State } from '@stencil/core';
9
9
  import { cloneDeep, compact, isEmpty, isObject, isString } from 'lodash-es';
10
10
  import { updateLocaleTranslation } from '../helpers';
@@ -95,9 +95,6 @@ export class YooFormCreatorTranslateDialogComponent {
95
95
  isCreateTranslationMode() {
96
96
  return this.mode === 'create' || this.mode === 'createInitial';
97
97
  }
98
- isTextEditor(translatableFormField, fieldType) {
99
- return translatableFormField === 'description' || translatableFormField === 'explanation' || (translatableFormField === 'value' && fieldType === 'information');
100
- }
101
98
  initTranslationForms() {
102
99
  var _a;
103
100
  this.selectedFieldLocation = this.initialSelectedFieldLocation;
@@ -167,13 +164,14 @@ export class YooFormCreatorTranslateDialogComponent {
167
164
  field.values = field.values.filter((val) => !field.answer.includes(val));
168
165
  }
169
166
  TRANSLATABLE_FORM_FIELD_ATTRIBUTES.forEach((translatableFormField) => {
167
+ const isRTE = isHTML(translateMulti((field === null || field === void 0 ? void 0 : field[translatableFormField]) || ''));
170
168
  if (field[translatableFormField] && !(hasComplexSentence && translatableFormField === 'sentence')) {
171
169
  if (translatableFormField === 'complexSentence') {
172
170
  hasComplexSentence = true;
173
171
  }
174
172
  slides[0].items.push({
175
173
  type: FormFieldType.textarea,
176
- language: this.isTextEditor(translatableFormField, field.type) ? 'html' : null,
174
+ language: isRTE && 'html',
177
175
  autoInitialRows: true,
178
176
  title: translate(translatableFormField.toUpperCase()),
179
177
  name: `${translatableFormField}Base`,
@@ -182,7 +180,7 @@ export class YooFormCreatorTranslateDialogComponent {
182
180
  });
183
181
  slides[0].items.push({
184
182
  type: FormFieldType.textarea,
185
- language: this.isTextEditor(translatableFormField, field.type) ? 'html' : null,
183
+ language: isRTE && 'html',
186
184
  autoInitialRows: true,
187
185
  title: translate(translatableFormField.toUpperCase()),
188
186
  name: translatableFormField,
@@ -210,11 +208,12 @@ export class YooFormCreatorTranslateDialogComponent {
210
208
  hasComplexValues = true;
211
209
  const value = isString(multiInputValue) ? multiInputValue : multiInputValue.text;
212
210
  if (value) {
211
+ const isRTE = isHTML(translateMulti(value));
213
212
  slides[0].items.push({
214
213
  type: FormFieldType.textarea,
215
214
  title: translate('VALUES'),
216
215
  hideLabel: complexValueIndex !== 0 || valueIndex !== 0,
217
- language: complexTranslatableAttr === 'complexTextSequenceValues' ? 'html' : null,
216
+ language: isRTE && 'html',
218
217
  formatAmpersandSymbol: true,
219
218
  autoInitialRows: true,
220
219
  name: `${complexTranslatableAttr}${complexValueIndex}${valueIndex}Base`,
@@ -225,7 +224,7 @@ export class YooFormCreatorTranslateDialogComponent {
225
224
  type: FormFieldType.textarea,
226
225
  title: translate('VALUES'),
227
226
  hideLabel: complexValueIndex !== 0 || valueIndex !== 0,
228
- language: complexTranslatableAttr === 'complexTextSequenceValues' ? 'html' : null,
227
+ language: isRTE && 'html',
229
228
  formatAmpersandSymbol: true,
230
229
  autoInitialRows: true,
231
230
  name: `${complexTranslatableAttr}${complexValueIndex}${valueIndex}`,
@@ -261,6 +260,7 @@ export class YooFormCreatorTranslateDialogComponent {
261
260
  hideLabel: valueIndex > 0,
262
261
  formatAmpersandSymbol: true,
263
262
  autoInitialRows: true,
263
+ language: isHTML(translate(value)) && 'html',
264
264
  name: `${singleArrayAttr}${valueIndex}Base`,
265
265
  width: 292,
266
266
  readonly: this.isTranslator
@@ -271,6 +271,7 @@ export class YooFormCreatorTranslateDialogComponent {
271
271
  hideLabel: valueIndex > 0,
272
272
  formatAmpersandSymbol: true,
273
273
  autoInitialRows: true,
274
+ language: isHTML(translate(value)) && 'html',
274
275
  name: `${singleArrayAttr}${valueIndex}`,
275
276
  inlineActions: [
276
277
  { icon: 'translate', iconColor: 'stable-alt', text: 'GOOGLETRANSLATE', handler: () => this.onTranslateField(value, locale) },
@@ -178,6 +178,7 @@ function keyTranslateRenderer(params) {
178
178
  return value;
179
179
  }
180
180
  function numberRenderer(params) {
181
+ var _a;
181
182
  const factor = params.factor || 1;
182
183
  const precision = params.numberPrecision;
183
184
  let retVal = params.value;
@@ -197,6 +198,9 @@ function numberRenderer(params) {
197
198
  else if (retVal && retVal.toString) {
198
199
  retVal = retVal.toString();
199
200
  }
201
+ else if ((_a = params) === null || _a === void 0 ? void 0 : _a.loader) {
202
+ return '<yoo-loader class="transparent ccenter-container" color="stable-light-to-light-10" size="small"></yoo-loader>';
203
+ }
200
204
  else {
201
205
  retVal = '';
202
206
  }
@@ -212,10 +216,14 @@ function numberRenderer(params) {
212
216
  return retVal.toString();
213
217
  }
214
218
  function percentageRenderer(params) {
219
+ var _a;
215
220
  const retVal = Number(params.value);
216
221
  const factor = params.factor || 1;
217
222
  const precision = params.numberPrecision;
218
223
  if (isNaN(retVal)) {
224
+ if ((_a = params) === null || _a === void 0 ? void 0 : _a.loader) {
225
+ return '<yoo-loader class="transparent ccenter-container" color="stable-light-to-light-10" size="small"></yoo-loader>';
226
+ }
219
227
  return `<div>${params.noValue || ''}</div>`;
220
228
  }
221
229
  const percentage = pipes.percent.transform(retVal, precision, factor);
@@ -262,6 +262,12 @@ export class YooGridComponent {
262
262
  this.addressAutocomplete.updateValues(field.tmpValues);
263
263
  }
264
264
  }
265
+ async refreshCells() {
266
+ var _a;
267
+ if (this.isAgGrid()) {
268
+ (_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.refreshCells();
269
+ }
270
+ }
265
271
  async scrollItem(index) {
266
272
  if (index < 0 || index >= this.filteredItems().length) {
267
273
  return;
@@ -988,8 +994,26 @@ export class YooGridComponent {
988
994
  return cleanedItems;
989
995
  }
990
996
  onToggleSelected(ev) {
997
+ var _a;
991
998
  this.isSelectedToggleView = ev.detail;
992
- this.items = ev.detail ? this.items.filter((item) => this.selection.some((selection) => (selection === null || selection === void 0 ? void 0 : selection._id) === (item === null || item === void 0 ? void 0 : item._id))) : this.itemList;
999
+ if (this.collectionName) {
1000
+ if (this.isSelectedToggleView) {
1001
+ const ids = compact((_a = this.selection) === null || _a === void 0 ? void 0 : _a.map((s) => s === null || s === void 0 ? void 0 : s._id));
1002
+ if (ids.length > 0) {
1003
+ this.isLoading = true;
1004
+ getAsyncExtraData({ type: 'get-by-ids', params: { collectionName: this.collectionName, ids } }).then((ret) => {
1005
+ this.items = ret;
1006
+ this.isLoading = false;
1007
+ });
1008
+ }
1009
+ }
1010
+ else {
1011
+ this.items = this.itemList;
1012
+ }
1013
+ }
1014
+ else {
1015
+ this.items = ev.detail ? this.items.filter((item) => this.selection.some((selection) => (selection === null || selection === void 0 ? void 0 : selection._id) === (item === null || item === void 0 ? void 0 : item._id))) : this.itemList;
1016
+ }
993
1017
  }
994
1018
  updateMarkers() {
995
1019
  var _a, _b, _c, _d, _e;
@@ -6926,6 +6950,22 @@ export class YooGridComponent {
6926
6950
  "tags": []
6927
6951
  }
6928
6952
  },
6953
+ "refreshCells": {
6954
+ "complexType": {
6955
+ "signature": "() => Promise<void>",
6956
+ "parameters": [],
6957
+ "references": {
6958
+ "Promise": {
6959
+ "location": "global"
6960
+ }
6961
+ },
6962
+ "return": "Promise<void>"
6963
+ },
6964
+ "docs": {
6965
+ "text": "",
6966
+ "tags": []
6967
+ }
6968
+ },
6929
6969
  "scrollItem": {
6930
6970
  "complexType": {
6931
6971
  "signature": "(index: number) => Promise<void>",
@@ -25,8 +25,9 @@ export function getNewValue(oldValues, newValues) {
25
25
  return checkArray(newValues) && newValues.filter((value) => !oldValues.includes(value))[0];
26
26
  }
27
27
  export function showWarningAlert(container, show = true, messageKey = 'NODUPLICATEVALUES') {
28
+ var _a;
28
29
  if (container && messageKey) {
29
- const bannerElement = container.querySelector('yoo-banner');
30
+ const bannerElement = container.querySelector('yoo-banner') || ((_a = container === null || container === void 0 ? void 0 : container.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('yoo-banner'));
30
31
  if (bannerElement) {
31
32
  bannerElement.heading = translate(messageKey);
32
33
  const bannerHeight = bannerElement.clientHeight;
@@ -116,29 +117,29 @@ export function initTags(tagsConfig) {
116
117
  }
117
118
  }
118
119
  }
119
- export function animateTags(tagsConfig, tagElements) {
120
+ export async function animateTags(tagsConfig, tagElements) {
120
121
  const ANIM_TRANSITION = .15;
121
122
  if (checkArray(tagElements)) {
122
- return gsapTimeline().then((timeline) => {
123
- if (!timeline) {
124
- return;
123
+ const timeline = await gsapTimeline();
124
+ if (!timeline) {
125
+ return;
126
+ }
127
+ return timeline({
128
+ paused: true,
129
+ onComplete() {
130
+ populateTags(tagsConfig);
125
131
  }
126
- const tl = timeline({
127
- paused: true,
128
- onComplete: () => {
129
- populateTags(tagsConfig);
130
- }
131
- });
132
- tl.staggerFrom(tagElements, ANIM_TRANSITION, {
133
- autoAlpha: 0,
134
- scale: 0,
135
- ease: Power1.easeOut
136
- }, ANIM_TRANSITION);
137
- tl.play();
138
- });
132
+ })
133
+ .staggerFrom(tagElements, ANIM_TRANSITION, {
134
+ autoAlpha: 0,
135
+ scale: 0,
136
+ ease: Power1.easeOut
137
+ }, ANIM_TRANSITION)
138
+ .play();
139
139
  }
140
140
  }
141
141
  function populateTags(tagsConfig) {
142
+ var _a;
142
143
  if (checkArray(tagsConfig.value)) {
143
144
  tagsConfig.value.forEach((v, zoneIndex) => {
144
145
  if (Array.isArray(v)) {
@@ -151,8 +152,8 @@ function populateTags(tagsConfig) {
151
152
  }
152
153
  });
153
154
  }
154
- if (!tagsConfig.isReadonly && checkArray(tagsConfig.values)) {
155
- tagsConfig.values.forEach((tagValue) => {
155
+ if (!tagsConfig.isReadonly) {
156
+ (_a = tagsConfig.values) === null || _a === void 0 ? void 0 : _a.forEach((tagValue) => {
156
157
  const tagZoneIndex = tagsConfig.zones.length - 1;
157
158
  return initTag(tagValue, tagZoneIndex, tagsConfig);
158
159
  });
@@ -525,25 +525,25 @@ export function getCampaignStateTags(campaign, removeStats) {
525
525
  color: campaign.active ? 'app-color' : 'stable-to-stable-20'
526
526
  });
527
527
  }
528
- if (campaign && (campaign.archived || ((_b = campaign.stats) === null || _b === void 0 ? void 0 : _b.status))) {
528
+ if (campaign && (campaign.archived || ((_b = campaign.campaignStats) === null || _b === void 0 ? void 0 : _b.status))) {
529
529
  retVal.push({
530
- innerHTML: translate((campaign.archived ? 'PAUSEDCAMPAIGN' : campaign.stats.status).toUpperCase()),
530
+ innerHTML: translate((campaign.archived ? 'PAUSEDCAMPAIGN' : campaign.campaignStats.status).toUpperCase()),
531
531
  color: campaign.archived ? 'dark-to-light' : 'info-to-info-20'
532
532
  });
533
533
  }
534
- if (!removeStats && ((_c = campaign === null || campaign === void 0 ? void 0 : campaign.stats) === null || _c === void 0 ? void 0 : _c.date)) {
534
+ if (!removeStats && ((_c = campaign === null || campaign === void 0 ? void 0 : campaign.campaignStats) === null || _c === void 0 ? void 0 : _c.date)) {
535
535
  let text = '';
536
- if (campaign.stats.status === 'live' || campaign.stats.status === 'completed') {
536
+ if (campaign.campaignStats.status === 'live' || campaign.campaignStats.status === 'completed') {
537
537
  text = 'LASTPUBLISHEDDATE';
538
538
  }
539
- if (campaign.stats.status === 'draft' || campaign.stats.status === 'archived') {
539
+ if (campaign.campaignStats.status === 'draft' || campaign.campaignStats.status === 'archived') {
540
540
  text = 'LASTMODIFICATIONDATE';
541
541
  }
542
- if (campaign.stats.status === 'scheduled') {
542
+ if (campaign.campaignStats.status === 'scheduled') {
543
543
  text = 'SCHEDULEDDATE';
544
544
  }
545
545
  retVal.push({
546
- innerHTML: translate(text) + ': ' + dateFormat(campaign.stats.date, 'L')
546
+ innerHTML: translate(text) + ': ' + dateFormat(campaign.campaignStats.date, 'L')
547
547
  });
548
548
  }
549
549
  if (campaign.hasWorkflow) {