@yoobic/yobi 8.6.0-0 → 8.6.0-1

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 (49) hide show
  1. package/dist/cjs/design-system.cjs.js +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{swiper-2317d7c0.js → swiper-822fcf76.js} +1 -1
  4. package/dist/cjs/yoo-audio-player.cjs.entry.js +3 -0
  5. package/dist/cjs/yoo-calendar.cjs.entry.js +1 -1
  6. package/dist/cjs/yoo-card-list.cjs.entry.js +1 -1
  7. package/dist/cjs/yoo-form-document.cjs.entry.js +1 -1
  8. package/dist/cjs/yoo-form-dynamic.cjs.entry.js +1 -0
  9. package/dist/cjs/yoo-form-swipe-cards.cjs.entry.js +12 -7
  10. package/dist/cjs/yoo-form-videoplayer.cjs.entry.js +4 -0
  11. package/dist/cjs/{yoo-ion-slides-eca11ec7.js → yoo-ion-slides-9abb9fbc.js} +2 -2
  12. package/dist/cjs/yoo-ion-slides.cjs.entry.js +1 -1
  13. package/dist/collection/components/2.molecules/audio-player/audio-player.js +12 -0
  14. package/dist/collection/components/2.molecules/calendar/calendar.css +9 -0
  15. package/dist/collection/components/2.molecules/slides/slides.js +1 -1
  16. package/dist/collection/components/entities/card-list/default/card-list.css +4 -0
  17. package/dist/collection/components/form/form-document/form-document.js +1 -1
  18. package/dist/collection/components/form/form-dynamic/form-dynamic.js +2 -1
  19. package/dist/collection/components/form/form-swipe-cards/form-swipe-cards.css +33 -4
  20. package/dist/collection/components/form/form-swipe-cards/form-swipe-cards.js +12 -7
  21. package/dist/collection/components/form/form-videoplayer/form-videoplayer.js +13 -0
  22. package/dist/design-system/design-system.esm.js +1 -1
  23. package/dist/{esm/swiper-7cb35276.js → design-system/swiper-e3fac676.js} +2 -2
  24. package/dist/design-system/yoo-audio-player.entry.js +3 -0
  25. package/dist/design-system/yoo-calendar.entry.js +1 -1
  26. package/dist/design-system/yoo-card-list.entry.js +1 -1
  27. package/dist/design-system/yoo-form-document.entry.js +1 -1
  28. package/dist/design-system/yoo-form-dynamic.entry.js +2 -1
  29. package/dist/design-system/yoo-form-swipe-cards.entry.js +13 -8
  30. package/dist/design-system/yoo-form-videoplayer.entry.js +4 -0
  31. package/dist/{esm/yoo-ion-slides-599081f7.js → design-system/yoo-ion-slides-c320435f.js} +2 -2
  32. package/dist/design-system/yoo-ion-slides.entry.js +1 -1
  33. package/dist/esm/design-system.js +1 -1
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/{design-system/swiper-7cb35276.js → esm/swiper-e3fac676.js} +2 -2
  36. package/dist/esm/yoo-audio-player.entry.js +3 -0
  37. package/dist/esm/yoo-calendar.entry.js +1 -1
  38. package/dist/esm/yoo-card-list.entry.js +1 -1
  39. package/dist/esm/yoo-form-document.entry.js +1 -1
  40. package/dist/esm/yoo-form-dynamic.entry.js +2 -1
  41. package/dist/esm/yoo-form-swipe-cards.entry.js +13 -8
  42. package/dist/esm/yoo-form-videoplayer.entry.js +4 -0
  43. package/dist/{design-system/yoo-ion-slides-599081f7.js → esm/yoo-ion-slides-c320435f.js} +2 -2
  44. package/dist/esm/yoo-ion-slides.entry.js +1 -1
  45. package/dist/types/components/2.molecules/audio-player/audio-player.d.ts +1 -0
  46. package/dist/types/components/form/form-swipe-cards/form-swipe-cards.d.ts +1 -0
  47. package/dist/types/components/form/form-videoplayer/form-videoplayer.d.ts +1 -0
  48. package/package.json +1 -1
  49. package/dist/types/components/form/image-cropper-dialog/pintura/pintura.d.ts +0 -1236
@@ -113,7 +113,7 @@ export class YooFormDocumentComponent {
113
113
  }
114
114
  }
115
115
  renderCardFile() {
116
- return (h("yoo-card-file", { isVisible: this.isVisible, file: this.document }));
116
+ return (h("yoo-card-file", { type: getType(this.document), isVisible: this.isVisible, file: this.document }));
117
117
  }
118
118
  renderBase() {
119
119
  var _a;
@@ -1,5 +1,5 @@
1
1
  import { FormFieldType, IncentivePartType, QUIZZ_COMPONENTS_FORM_FIELDS } from '@shared/interfaces';
2
- import { answerIsValid, cancelRequestInterval, closeModal, debounce, disableKeyboardResize, enableKeyboardResize, evalInContext, findField, findParent, getConfidenceDescriptionKey, getConfidenceEmoji, getCssColor, getDistance, getFieldReplacement, getFieldValue, getModalAnimation, getSession, hasValue, isAndroid, isAnimationsDisabled, isChromeForIos, isConfidenceAssessment, isContentOnly, isFieldWithDirectValue, isFieldWithNoValue, isIonic, isIOS, isIphoneX, isKeyboardResizeModeInactive, isNativeMobile, isNullOrUndefined, isPhotoOrMultiPhotosField, isPresent, isQuiz, isSafari, isSamsung, isTimedQuiz, isValueATranslationKey, isVisible, isWeb, pipes, requestInterval, showContextMenu, showModal, showToast, slenderizeObject, translate, translateMulti, updateDatasetFilters } from '@shared/utils';
2
+ import { answerIsValid, cancelRequestInterval, closeModal, debounce, disableKeyboardResize, dispatchCustomEvent, enableKeyboardResize, evalInContext, findField, findParent, getConfidenceDescriptionKey, getConfidenceEmoji, getCssColor, getDistance, getFieldReplacement, getFieldValue, getModalAnimation, getSession, hasValue, isAndroid, isAnimationsDisabled, isChromeForIos, isConfidenceAssessment, isContentOnly, isFieldWithDirectValue, isFieldWithNoValue, isIonic, isIOS, isIphoneX, isKeyboardResizeModeInactive, isNativeMobile, isNullOrUndefined, isPhotoOrMultiPhotosField, isPresent, isQuiz, isSafari, isSamsung, isTimedQuiz, isValueATranslationKey, isVisible, isWeb, pipes, requestInterval, showContextMenu, showModal, showToast, slenderizeObject, translate, translateMulti, updateDatasetFilters } from '@shared/utils';
3
3
  import { forceUpdate, h, Host } from '@stencil/core';
4
4
  import { assign, cloneDeep, compact, findLastIndex, flatten, get, groupBy, isArray, isEmpty, isEqual, isFunction, isNumber, isObject, isString, keys, orderBy, pick, range, result, uniqBy } from 'lodash-es';
5
5
  import { getMissionStatusIconName } from '../../../feature-operate/campaign/helpers/operation-helpers';
@@ -1477,6 +1477,7 @@ export class YooFormDynamicComponent {
1477
1477
  ev.stopPropagation();
1478
1478
  this.cleanHiddenReadonlyFieldsByInvalidRules();
1479
1479
  this.save.emit(this.currentData);
1480
+ dispatchCustomEvent('pauseMedia', window);
1480
1481
  }
1481
1482
  onWorflowReject(ev) {
1482
1483
  ev.stopPropagation();
@@ -515,7 +515,6 @@ svg:not(:root) {
515
515
  :host(:not([readonly])) #game {
516
516
  display: grid;
517
517
  grid-template-rows: calc(min(65vw, 16rem) * 4 / 3 + 6%) auto;
518
- overflow: hidden auto;
519
518
  }
520
519
  :host(:not([readonly])) #game #background {
521
520
  position: relative;
@@ -706,9 +705,13 @@ svg:not(:root) {
706
705
  :host([view=instructions]) main {
707
706
  grid-template-rows: 1fr auto;
708
707
  }
708
+ :host([view=instructions]) main #instructions {
709
+ overflow-y: auto;
710
+ }
709
711
  :host([view=instructions]) main #instructions #header {
710
712
  display: flex;
711
713
  flex-direction: column;
714
+ word-break: break-word;
712
715
  }
713
716
  :host([view=instructions]) main #instructions #header #title {
714
717
  font-weight: bold;
@@ -749,6 +752,14 @@ svg:not(:root) {
749
752
  --outer-container-padding: cssvar(spacing-16) cssvar(spacing-16);
750
753
  width: calc(100% - var(--spacing-16, 1rem));
751
754
  }
755
+ :host([view=instructions]) main #start {
756
+ position: absolute;
757
+ display: flex;
758
+ align-items: center;
759
+ justify-content: center;
760
+ width: 100%;
761
+ background: var(--light, #ffffff);
762
+ }
752
763
  :host([view=instructions]) main yoo-button {
753
764
  align-items: flex-end;
754
765
  }
@@ -763,10 +774,21 @@ svg:not(:root) {
763
774
  font-weight: bold;
764
775
  font-size: var(--font-size-28, 1.75rem);
765
776
  }
766
- :host(.mobile[view=instructions]) yoo-button {
767
- margin: var(--spacing-16, 1rem) 0;
777
+ :host(.mobile[view=instructions]) #instructions #categories {
778
+ padding-bottom: calc(var(--spacing-64, 4rem));
779
+ }
780
+ :host(.mobile[view=instructions]) #start {
781
+ bottom: calc(var(--spacing-08, 0.5rem) * -1);
782
+ height: 5.875rem;
783
+ }
784
+ :host(.mobile[view=instructions]) #start yoo-button {
785
+ width: 100%;
786
+ margin-bottom: var(--safe-area-inset-bottom);
768
787
  }
769
788
 
789
+ :host(.web[view=instructions]) #instructions {
790
+ height: calc(100% - (3.875rem - var(--spacing-16, 1rem)));
791
+ }
770
792
  :host(.web[view=instructions]) yoo-icon[name=swipe-explanation] {
771
793
  width: 5rem;
772
794
  height: 5rem;
@@ -774,13 +796,19 @@ svg:not(:root) {
774
796
  --inner-width: 5rem;
775
797
  --inner-height: 5rem;
776
798
  }
777
- :host(.web[view=instructions]) yoo-button {
799
+ :host(.web[view=instructions]) #start {
800
+ bottom: calc(var(--spacing-16, 1rem) * -1);
801
+ height: 3.875rem;
802
+ }
803
+ :host(.web[view=instructions]) #start yoo-button {
804
+ width: fit-content;
778
805
  margin-right: var(--spacing-16, 1rem);
779
806
  margin-left: auto;
780
807
  }
781
808
 
782
809
  :host(.web[view=game]) main {
783
810
  grid-template-rows: auto 1fr;
811
+ overflow: hidden auto;
784
812
  }
785
813
  :host(.web[view=game]) main #actions {
786
814
  top: 109%;
@@ -800,6 +828,7 @@ svg:not(:root) {
800
828
  padding: var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);
801
829
  line-height: 1.75;
802
830
  text-align: center;
831
+ word-break: break-word;
803
832
  background-color: var(--stable-ultralight, #fafafa);
804
833
  }
805
834
  :host(.web) #header #title {
@@ -1,5 +1,5 @@
1
1
  import { SwipeCardsDirection, SwipeCardsMode } from '@shared/interfaces';
2
- import { Draggable, findParent, getMedia, getUUID, gsapSet, gsapTimeline, gsapTo, isCloudinaryLink, isWeb, Power1, translate, translateMulti } from '@shared/utils';
2
+ import { Draggable, findParent, getMedia, getUUID, gsapSet, gsapTimeline, gsapTo, isCloudinaryLink, isIOS, isNativeMobile, isWeb, Power1, translate, translateMulti } from '@shared/utils';
3
3
  import { forceUpdate, h, Host } from '@stencil/core';
4
4
  import { clamp, inRange, isEqual, shuffle } from 'lodash-es';
5
5
  import { getAppContext } from '../../../utils/helpers/common-helpers';
@@ -171,9 +171,9 @@ export class YooFormSwipeCardsComponent {
171
171
  this.hasDataChanged = false;
172
172
  this.initDraggable();
173
173
  setTimeout(() => {
174
- if (this.host.scrollHeight > this.host.clientHeight) {
175
- this.host.scrollTo({
176
- top: this.host.scrollHeight,
174
+ if (this.mainElement.scrollHeight > this.mainElement.clientHeight) {
175
+ this.mainElement.scrollTo({
176
+ top: this.mainElement.scrollHeight,
177
177
  behavior: 'smooth'
178
178
  });
179
179
  }
@@ -291,6 +291,11 @@ export class YooFormSwipeCardsComponent {
291
291
  swipeAnimation.fromTo(this.buttons.left, 1, { scale: 1.5 }, { scale: 1 }, 0).fromTo(this.buttons.right, 1, { scale: 1 }, { scale: 1.5 }, 1).progress(0.5);
292
292
  const onStartSwiping = () => {
293
293
  if (isSwipeable(cardElement)) {
294
+ const { width, height } = cardElement.getBoundingClientRect();
295
+ isNativeMobile() && isIOS() && Object.assign(cardElement.style, {
296
+ width: `${width}px`,
297
+ height: `${height}px`
298
+ });
294
299
  returnedAnimation === null || returnedAnimation === void 0 ? void 0 : returnedAnimation.kill();
295
300
  }
296
301
  };
@@ -421,11 +426,11 @@ export class YooFormSwipeCardsComponent {
421
426
  }
422
427
  renderStartButton() {
423
428
  return (!this.readonly &&
424
- this.showInstructionView && (h("yoo-button", { disabled: !this.hasData || !this.isDataValid, size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", onClick: () => {
429
+ this.showInstructionView && (h("section", { id: "start" }, h("yoo-button", { disabled: !this.hasData || !this.isDataValid, size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", onClick: () => {
425
430
  this.revealCards = true;
426
431
  this.showInstructionView = false;
427
432
  this.displayFooterElement();
428
- } }, translate('START'))));
433
+ } }, translate('START')))));
429
434
  }
430
435
  renderInstructions() {
431
436
  return [h("section", { id: "instructions" }, this.renderHeaderInstructions()), this.renderStartButton()];
@@ -451,7 +456,7 @@ export class YooFormSwipeCardsComponent {
451
456
  !this.readonly && (h("yoo-banner", null, h("p", { slot: "content" }))));
452
457
  }
453
458
  renderMain() {
454
- return h("main", null, !this.readonly && (this.showInstructionView ? this.renderInstructions() : this.renderGame()));
459
+ return h("main", { ref: (el) => this.mainElement = el }, !this.readonly && (this.showInstructionView ? this.renderInstructions() : this.renderGame()));
455
460
  }
456
461
  render() {
457
462
  return (h(Host, { class: { ...getAppContext(this.host), 'swiper-no-swiping': !this.readonly }, ...{ view: this.showInstructionView ? 'instructions' : 'game' } }, this.renderBanner(), this.renderMain(), this.renderSummary()));
@@ -17,6 +17,10 @@ export class YooFormVideoPlayerComponent {
17
17
  this.videoInstance.pauseVideo();
18
18
  }
19
19
  }
20
+ onPauseMedia() {
21
+ var _a, _b;
22
+ (_b = (_a = this.videoInstance) === null || _a === void 0 ? void 0 : _a.pauseVideo) === null || _b === void 0 ? void 0 : _b.call(_a);
23
+ }
20
24
  connectedCallback() {
21
25
  if (isOffline()) {
22
26
  this.inputChanged.emit(true);
@@ -153,4 +157,13 @@ export class YooFormVideoPlayerComponent {
153
157
  "methodName": "updateVisibility"
154
158
  }];
155
159
  }
160
+ static get listeners() {
161
+ return [{
162
+ "name": "pauseMedia",
163
+ "method": "onPauseMedia",
164
+ "target": "window",
165
+ "capture": false,
166
+ "passive": false
167
+ }];
168
+ }
156
169
  }