@yoobic/yobi 8.5.11 → 8.5.12

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 (42) hide show
  1. package/dist/cjs/{index-485de4aa.js → index-bd063b62.js} +3 -0
  2. package/dist/cjs/yoo-form-creator-block-expandable.cjs.entry.js +1 -1
  3. package/dist/cjs/yoo-form-creator-condition-block.cjs.entry.js +1 -1
  4. package/dist/cjs/yoo-form-creator-page-card-list.cjs.entry.js +1 -1
  5. package/dist/cjs/yoo-form-creator-page-card.cjs.entry.js +1 -1
  6. package/dist/cjs/yoo-form-creator-score-expandable.cjs.entry.js +1 -1
  7. package/dist/cjs/yoo-form-creator-translate-dialog.cjs.entry.js +1 -1
  8. package/dist/cjs/yoo-form-creator-translate.cjs.entry.js +1 -1
  9. package/dist/cjs/yoo-form-creator-workflow-side-selection.cjs.entry.js +1 -1
  10. package/dist/cjs/yoo-form-creator.cjs.entry.js +1 -1
  11. package/dist/cjs/yoo-form-dynamic.cjs.entry.js +4 -4
  12. package/dist/cjs/yoo-workflow.cjs.entry.js +1 -1
  13. package/dist/collection/components/form/form-dynamic/form-dynamic.js +5 -5
  14. package/dist/collection/components/form/form-input-container/form-input-container.js +1 -1
  15. package/dist/collection/components/form-creator/helpers/index.js +3 -0
  16. package/dist/design-system/{index-61ca11b9.js → index-c7d9c582.js} +3 -0
  17. package/dist/design-system/yoo-form-creator-block-expandable.entry.js +1 -1
  18. package/dist/design-system/yoo-form-creator-condition-block.entry.js +1 -1
  19. package/dist/design-system/yoo-form-creator-page-card-list.entry.js +1 -1
  20. package/dist/design-system/yoo-form-creator-page-card.entry.js +1 -1
  21. package/dist/design-system/yoo-form-creator-score-expandable.entry.js +1 -1
  22. package/dist/design-system/yoo-form-creator-translate-dialog.entry.js +1 -1
  23. package/dist/design-system/yoo-form-creator-translate.entry.js +1 -1
  24. package/dist/design-system/yoo-form-creator-workflow-side-selection.entry.js +1 -1
  25. package/dist/design-system/yoo-form-creator.entry.js +1 -1
  26. package/dist/design-system/yoo-form-dynamic.entry.js +4 -4
  27. package/dist/design-system/yoo-workflow.entry.js +1 -1
  28. package/dist/esm/{index-61ca11b9.js → index-c7d9c582.js} +3 -0
  29. package/dist/esm/yoo-form-creator-block-expandable.entry.js +1 -1
  30. package/dist/esm/yoo-form-creator-condition-block.entry.js +1 -1
  31. package/dist/esm/yoo-form-creator-page-card-list.entry.js +1 -1
  32. package/dist/esm/yoo-form-creator-page-card.entry.js +1 -1
  33. package/dist/esm/yoo-form-creator-score-expandable.entry.js +1 -1
  34. package/dist/esm/yoo-form-creator-translate-dialog.entry.js +1 -1
  35. package/dist/esm/yoo-form-creator-translate.entry.js +1 -1
  36. package/dist/esm/yoo-form-creator-workflow-side-selection.entry.js +1 -1
  37. package/dist/esm/yoo-form-creator.entry.js +1 -1
  38. package/dist/esm/yoo-form-dynamic.entry.js +4 -4
  39. package/dist/esm/yoo-workflow.entry.js +1 -1
  40. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +1 -1
  41. package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/ui/form/form.interface.d.ts +1 -1
  42. package/package.json +1 -1
@@ -339,6 +339,9 @@ function getDefaultField(field, type) {
339
339
  if (type === 'lesson') {
340
340
  newField.required = true;
341
341
  }
342
+ if (type === 'mission' && [index$1.FormFieldType.number, index$1.FormFieldType.slider].includes(field.type)) {
343
+ newField.allowDecimals = true;
344
+ }
342
345
  return newField;
343
346
  }
344
347
  function setParentConditions(slides) {
@@ -7,7 +7,7 @@ const index$1 = require('./index-ec5dad3e.js');
7
7
  require('./index-b3e14aed.js');
8
8
  const lodash = require('./lodash-a9050d79.js');
9
9
  const index$4 = require('./index-029fb2d6.js');
10
- const index$3 = require('./index-485de4aa.js');
10
+ const index$3 = require('./index-bd063b62.js');
11
11
  const index$2 = require('./index-3ad228d9.js');
12
12
  require('./annotations-helpers-fb554cca.js');
13
13
  require('./_commonjsHelpers-94df2ea7.js');
@@ -6,7 +6,7 @@ const index = require('./index-9ca0e46c.js');
6
6
  const index$1 = require('./index-ec5dad3e.js');
7
7
  require('./index-b3e14aed.js');
8
8
  const index$4 = require('./index-7d3c7ee7.js');
9
- const index$2 = require('./index-485de4aa.js');
9
+ const index$2 = require('./index-bd063b62.js');
10
10
  const index$3 = require('./index-3ad228d9.js');
11
11
  require('./lodash-a9050d79.js');
12
12
  require('./annotations-helpers-fb554cca.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-9ca0e46c.js');
6
6
  require('./index-b3e14aed.js');
7
7
  const sortable_esm = require('./sortable.esm-00e15691.js');
8
- const index$1 = require('./index-485de4aa.js');
8
+ const index$1 = require('./index-bd063b62.js');
9
9
  const index$2 = require('./index-3ad228d9.js');
10
10
  require('./lodash-a9050d79.js');
11
11
  require('./index-ec5dad3e.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-9ca0e46c.js');
6
6
  require('./index-b3e14aed.js');
7
- const index$1 = require('./index-485de4aa.js');
7
+ const index$1 = require('./index-bd063b62.js');
8
8
  const index$2 = require('./index-3ad228d9.js');
9
9
  require('./lodash-a9050d79.js');
10
10
  require('./index-ec5dad3e.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-9ca0e46c.js');
6
6
  const index$1 = require('./index-ec5dad3e.js');
7
7
  require('./index-b3e14aed.js');
8
- const index$3 = require('./index-485de4aa.js');
8
+ const index$3 = require('./index-bd063b62.js');
9
9
  const index$2 = require('./index-3ad228d9.js');
10
10
  require('./lodash-a9050d79.js');
11
11
  require('./annotations-helpers-fb554cca.js');
@@ -6,7 +6,7 @@ const index = require('./index-9ca0e46c.js');
6
6
  const index$3 = require('./index-ec5dad3e.js');
7
7
  require('./index-b3e14aed.js');
8
8
  const lodash = require('./lodash-a9050d79.js');
9
- const index$2 = require('./index-485de4aa.js');
9
+ const index$2 = require('./index-bd063b62.js');
10
10
  const index$1 = require('./index-3ad228d9.js');
11
11
  require('./annotations-helpers-fb554cca.js');
12
12
  require('./_commonjsHelpers-94df2ea7.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-9ca0e46c.js');
6
6
  require('./index-b3e14aed.js');
7
7
  const lodash = require('./lodash-a9050d79.js');
8
- const index$2 = require('./index-485de4aa.js');
8
+ const index$2 = require('./index-bd063b62.js');
9
9
  const index$1 = require('./index-3ad228d9.js');
10
10
  require('./index-ec5dad3e.js');
11
11
  require('./annotations-helpers-fb554cca.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-9ca0e46c.js');
6
6
  require('./index-b3e14aed.js');
7
7
  const commonHelpers = require('./common-helpers-4137cff6.js');
8
- const index$1 = require('./index-485de4aa.js');
8
+ const index$1 = require('./index-bd063b62.js');
9
9
  const index$2 = require('./index-3ad228d9.js');
10
10
  require('./lodash-a9050d79.js');
11
11
  require('./index-ec5dad3e.js');
@@ -10,7 +10,7 @@ const sortable_esm = require('./sortable.esm-00e15691.js');
10
10
  const index$1 = require('./index-c55e4a15.js');
11
11
  const commonHelpers = require('./common-helpers-4137cff6.js');
12
12
  const index$5 = require('./index-029fb2d6.js');
13
- const index$3 = require('./index-485de4aa.js');
13
+ const index$3 = require('./index-bd063b62.js');
14
14
  const index$4 = require('./index-3ad228d9.js');
15
15
  const formField_instance = require('./form-field.instance-410c2aea.js');
16
16
  require('./workflow.interface-ffda8358.js');
@@ -835,7 +835,7 @@ const YooFormDynamicComponent = class {
835
835
  commonHelpers.lockSwipes(this.ionSlides, true);
836
836
  }
837
837
  // Disabled this because of the warnings from stencil , not sure we still need it
838
- if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !['form-creator-announcement', 'form-creator-block'].includes(this.formType) && !(this.isMission() && !index$1.isWeb(this.host))) {
838
+ if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !this.shouldUseTranslations() && !(this.isMission() && !index$1.isWeb(this.host))) {
839
839
  this.updateState(true);
840
840
  }
841
841
  this.host.classList.remove('no-initial-height');
@@ -1010,7 +1010,7 @@ const YooFormDynamicComponent = class {
1010
1010
  return this.formType === 'workflow' || this.formType === 'form-creator-preview-workflow';
1011
1011
  }
1012
1012
  isFormCreatorBlock() {
1013
- return this.formType === 'form-creator-block';
1013
+ return this.formType === 'form-creator-block' || this.formType === 'lesson-creator-block';
1014
1014
  }
1015
1015
  shouldUseTranslations() {
1016
1016
  return this.isFormCreatorBlock() || this.formType === 'form-creator-announcement';
@@ -2170,7 +2170,7 @@ const YooFormDynamicComponent = class {
2170
2170
  }
2171
2171
  }
2172
2172
  onTabSelected(ev) {
2173
- if (!this.isLivePreview() && this.formType !== 'form-creator-block') {
2173
+ if (!this.isLivePreview() && !this.isFormCreatorBlock()) {
2174
2174
  this.selectedTabIndexState = -1;
2175
2175
  }
2176
2176
  else {
@@ -3292,7 +3292,7 @@ const YooFormDynamicComponent = class {
3292
3292
  extraAttrs = {
3293
3293
  min: field.min,
3294
3294
  max: field.max,
3295
- allowDecimals: field.allowDecimals,
3295
+ allowDecimals: lodash.isFunction(field.allowDecimals) ? field.allowDecimals(this.host) : field.allowDecimals,
3296
3296
  maxCharacters: field.maxCharacters,
3297
3297
  type: field.type === index.FormFieldType.number && index$1.isSamsung() ? index.FormFieldType.text : getInputType(field),
3298
3298
  inputmode: field.type === index.FormFieldType.number && index$1.isSamsung() ? 'numeric' : '',
@@ -8,7 +8,7 @@ const lodash = require('./lodash-a9050d79.js');
8
8
  const workflow_interface = require('./workflow.interface-ffda8358.js');
9
9
  const commonHelpers = require('./common-helpers-4137cff6.js');
10
10
  const index$4 = require('./index-029fb2d6.js');
11
- const index$2 = require('./index-485de4aa.js');
11
+ const index$2 = require('./index-bd063b62.js');
12
12
  const index$3 = require('./index-9c56868f.js');
13
13
  const index$1 = require('./index-3ad228d9.js');
14
14
  require('./index-ec5dad3e.js');
@@ -635,7 +635,7 @@ export class YooFormDynamicComponent {
635
635
  lockSwipes(this.ionSlides, true);
636
636
  }
637
637
  // Disabled this because of the warnings from stencil , not sure we still need it
638
- if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !['form-creator-announcement', 'form-creator-block'].includes(this.formType) && !(this.isMission() && !isWeb(this.host))) {
638
+ if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !this.shouldUseTranslations() && !(this.isMission() && !isWeb(this.host))) {
639
639
  this.updateState(true);
640
640
  }
641
641
  this.host.classList.remove('no-initial-height');
@@ -810,7 +810,7 @@ export class YooFormDynamicComponent {
810
810
  return this.formType === 'workflow' || this.formType === 'form-creator-preview-workflow';
811
811
  }
812
812
  isFormCreatorBlock() {
813
- return this.formType === 'form-creator-block';
813
+ return this.formType === 'form-creator-block' || this.formType === 'lesson-creator-block';
814
814
  }
815
815
  shouldUseTranslations() {
816
816
  return this.isFormCreatorBlock() || this.formType === 'form-creator-announcement';
@@ -1970,7 +1970,7 @@ export class YooFormDynamicComponent {
1970
1970
  }
1971
1971
  }
1972
1972
  onTabSelected(ev) {
1973
- if (!this.isLivePreview() && this.formType !== 'form-creator-block') {
1973
+ if (!this.isLivePreview() && !this.isFormCreatorBlock()) {
1974
1974
  this.selectedTabIndexState = -1;
1975
1975
  }
1976
1976
  else {
@@ -3092,7 +3092,7 @@ export class YooFormDynamicComponent {
3092
3092
  extraAttrs = {
3093
3093
  min: field.min,
3094
3094
  max: field.max,
3095
- allowDecimals: field.allowDecimals,
3095
+ allowDecimals: isFunction(field.allowDecimals) ? field.allowDecimals(this.host) : field.allowDecimals,
3096
3096
  maxCharacters: field.maxCharacters,
3097
3097
  type: field.type === FormFieldType.number && isSamsung() ? FormFieldType.text : getInputType(field),
3098
3098
  inputmode: field.type === FormFieldType.number && isSamsung() ? 'numeric' : '',
@@ -5009,7 +5009,7 @@ export class YooFormDynamicComponent {
5009
5009
  "mutable": false,
5010
5010
  "complexType": {
5011
5011
  "original": "FormDynamicType",
5012
- "resolved": "\"feed\" | \"form-creator-announcement\" | \"form-creator-block\" | \"form-creator-preview\" | \"form-creator-preview-kanban\" | \"form-creator-preview-lesson\" | \"form-creator-preview-workflow\" | \"kanban\" | \"lesson\" | \"lesson-detail\" | \"lesson-question-result\" | \"mission\" | \"mission-validation\" | \"poll\" | \"service\" | \"todo\" | \"visit\" | \"waitlist\" | \"workflow\"",
5012
+ "resolved": "\"feed\" | \"form-creator-announcement\" | \"form-creator-block\" | \"form-creator-preview\" | \"form-creator-preview-kanban\" | \"form-creator-preview-lesson\" | \"form-creator-preview-workflow\" | \"kanban\" | \"lesson\" | \"lesson-creator-block\" | \"lesson-detail\" | \"lesson-question-result\" | \"mission\" | \"mission-validation\" | \"poll\" | \"service\" | \"todo\" | \"visit\" | \"waitlist\" | \"workflow\"",
5013
5013
  "references": {
5014
5014
  "FormDynamicType": {
5015
5015
  "location": "import",
@@ -377,7 +377,7 @@ export class YooFormInputContainerComponent {
377
377
  "mutable": false,
378
378
  "complexType": {
379
379
  "original": "FormDynamicType",
380
- "resolved": "\"feed\" | \"form-creator-announcement\" | \"form-creator-block\" | \"form-creator-preview\" | \"form-creator-preview-kanban\" | \"form-creator-preview-lesson\" | \"form-creator-preview-workflow\" | \"kanban\" | \"lesson\" | \"lesson-detail\" | \"lesson-question-result\" | \"mission\" | \"mission-validation\" | \"poll\" | \"service\" | \"todo\" | \"visit\" | \"waitlist\" | \"workflow\"",
380
+ "resolved": "\"feed\" | \"form-creator-announcement\" | \"form-creator-block\" | \"form-creator-preview\" | \"form-creator-preview-kanban\" | \"form-creator-preview-lesson\" | \"form-creator-preview-workflow\" | \"kanban\" | \"lesson\" | \"lesson-creator-block\" | \"lesson-detail\" | \"lesson-question-result\" | \"mission\" | \"mission-validation\" | \"poll\" | \"service\" | \"todo\" | \"visit\" | \"waitlist\" | \"workflow\"",
381
381
  "references": {
382
382
  "FormDynamicType": {
383
383
  "location": "import",
@@ -335,6 +335,9 @@ export function getDefaultField(field, type) {
335
335
  if (type === 'lesson') {
336
336
  newField.required = true;
337
337
  }
338
+ if (type === 'mission' && [FormFieldType.number, FormFieldType.slider].includes(field.type)) {
339
+ newField.allowDecimals = true;
340
+ }
338
341
  return newField;
339
342
  }
340
343
  export function setParentConditions(slides) {
@@ -337,6 +337,9 @@ function getDefaultField(field, type) {
337
337
  if (type === 'lesson') {
338
338
  newField.required = true;
339
339
  }
340
+ if (type === 'mission' && [FormFieldType.number, FormFieldType.slider].includes(field.type)) {
341
+ newField.allowDecimals = true;
342
+ }
340
343
  return newField;
341
344
  }
342
345
  function setParentConditions(slides) {
@@ -3,7 +3,7 @@ import { Y as FORM_CREATOR_OPTIONS_ALL, A as ALL_MOBILE_FORM_FIELDS, u as FormFi
3
3
  import './index-0b3d2e69.js';
4
4
  import { n as compact } from './lodash-777f91de.js';
5
5
  import { N as NON_CONDITION_CATEGORIES, a as NON_CONDITION_TYPES } from './index-c3215c3c.js';
6
- import { l as setBlockSelection, S as setRestrictionAndConditionActions, T as filterSequentialFields, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-61ca11b9.js';
6
+ import { l as setBlockSelection, S as setRestrictionAndConditionActions, T as filterSequentialFields, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-c7d9c582.js';
7
7
  import { k as isNullOrUndefined, I as debounce, t as translate, aW as gsapTo, aX as gsapSet, dr as Power3, aY as gsapFromTo, a3 as translateMulti } from './index-998eec90.js';
8
8
  import './annotations-helpers-f7b42b40.js';
9
9
  import './_commonjsHelpers-f4d11124.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, i as createEvent, f as forceUpdate, h, e as Host
2
2
  import { A as ALL_MOBILE_FORM_FIELDS } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
4
  import { f as feedbackValues } from './index-2319a076.js';
5
- import { l as setBlockSelection, U as setPageSelection } from './index-61ca11b9.js';
5
+ import { l as setBlockSelection, U as setPageSelection } from './index-c7d9c582.js';
6
6
  import { t as translate, k as isNullOrUndefined, a3 as translateMulti } from './index-998eec90.js';
7
7
  import './lodash-777f91de.js';
8
8
  import './annotations-helpers-f7b42b40.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { S as Sortable } from './sortable.esm-f788d1ca.js';
4
- import { I as setRestrictionAndFieldConditions, Q as getWorkflowFieldState } from './index-61ca11b9.js';
4
+ import { I as setRestrictionAndFieldConditions, Q as getWorkflowFieldState } from './index-c7d9c582.js';
5
5
  import { k as isNullOrUndefined, a3 as translateMulti, t as translate } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './index-4bbbf966.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, i as createEvent, h } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
- import { S as setRestrictionAndConditionActions } from './index-61ca11b9.js';
3
+ import { S as setRestrictionAndConditionActions } from './index-c7d9c582.js';
4
4
  import { t as translate } from './index-998eec90.js';
5
5
  import './lodash-777f91de.js';
6
6
  import './index-4bbbf966.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import { Y as FORM_CREATOR_OPTIONS_ALL, S as ScoringCategory, A as ALL_MOBILE_FORM_FIELDS, c as FormFieldType, T as TRUE_PRESENCE_VALUE_TEXT, e as FALSE_PRESENCE_VALUE_TEXT } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
- import { K as starRatingMaxDefault } from './index-61ca11b9.js';
4
+ import { K as starRatingMaxDefault } from './index-c7d9c582.js';
5
5
  import { k as isNullOrUndefined, aW as gsapTo, dr as Power3, aY as gsapFromTo, ds as findMaxScore, a3 as translateMulti, t as translate, dt as isNotApplicable } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './annotations-helpers-f7b42b40.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, i as createEvent, h, e as Host, g as getElement
2
2
  import { f as TRANSLATABLE_FORM_FIELD_ATTRIBUTES, c as FormFieldType, C as COMPLEX_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES, g as SINGLE_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
4
  import { n as compact, c as cloneDeep, v as isObject, y as isEmpty, p as isString } from './lodash-777f91de.js';
5
- import { R as updateLocaleTranslation } from './index-61ca11b9.js';
5
+ import { R as updateLocaleTranslation } from './index-c7d9c582.js';
6
6
  import { I as debounce, b8 as formatSlides, aA as getCurrentLanguage, dH as getLocaleTranslation, dI as isHTML, a3 as translateMulti, t as translate, b3 as findField, w as closeModal, dq as getTranslateLanguageKeys } from './index-998eec90.js';
7
7
  import './annotations-helpers-f7b42b40.js';
8
8
  import './_commonjsHelpers-f4d11124.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { c as cloneDeep, A as isEqual, a0 as remove } from './lodash-777f91de.js';
4
- import { L as resetKey, M as resetFieldTranslations, t as translateAll, N as isAlreadyTranslated, O as addRow } from './index-61ca11b9.js';
4
+ import { L as resetKey, M as resetFieldTranslations, t as translateAll, N as isAlreadyTranslated, O as addRow } from './index-c7d9c582.js';
5
5
  import { b8 as formatSlides, du as cleanUnusedTranslations, dq as getTranslateLanguageKeys, b6 as hasImageRecognitionFields, k as isNullOrUndefined, t as translate, d0 as getAuthentication, ay as getLanguageKey, aj as showAlert, w as closeModal, dv as updateScoringWithTranslations, dw as updateAuditWithTranslations, G as showModal } from './index-998eec90.js';
6
6
  import './index-4bbbf966.js';
7
7
  import './annotations-helpers-f7b42b40.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
4
- import { P as onWorkflowStepClicked } from './index-61ca11b9.js';
4
+ import { P as onWorkflowStepClicked } from './index-c7d9c582.js';
5
5
  import { t as translate } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './index-4bbbf966.js';
@@ -6,7 +6,7 @@ import { S as Sortable } from './sortable.esm-f788d1ca.js';
6
6
  import { F as FORM_CREATOR_BULK_ACTIONS_ALL } from './index-c04e931c.js';
7
7
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
8
8
  import { N as NON_CONDITION_CATEGORIES, a as NON_CONDITION_TYPES, A as ARROW_PAIR } from './index-c3215c3c.js';
9
- import { a as addNewIdsToSlide, s as serializeScoringValuePairs, u as updateSelectedFields, i as isScoring, g as getExpandableBlockReference, r as removeCondition, b as removePageCondtion, c as addNewUnattachedParentConditions, d as deleteFieldAndRemoveConditionReferences, e as duplicateField, f as deleteCondition, h as deleteUnattachedParentConditions, j as findCondition, k as updateCondition, l as setBlockSelection, m as cleanCustomFormFieldSlides, t as translateAll, n as cleanUnattachedParentConditions, o as removeSelectedItems, p as setSelectedScoring, q as getFieldsWithScoring, v as populateFieldsWithScoring, w as setFormFieldIndex, x as setParentConditions, y as updateUnattatchedCondition, z as doesSlidePageHaveItems, A as getNumberOfSequentialFields, B as getDefaultCondition, C as addNewParentCondition, D as createNewIdsForCustomFields, E as getDefaultField, F as getScoringQuickSetupData, G as checkForFieldAttribute, H as populateMissingValues, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-61ca11b9.js';
9
+ import { a as addNewIdsToSlide, s as serializeScoringValuePairs, u as updateSelectedFields, i as isScoring, g as getExpandableBlockReference, r as removeCondition, b as removePageCondtion, c as addNewUnattachedParentConditions, d as deleteFieldAndRemoveConditionReferences, e as duplicateField, f as deleteCondition, h as deleteUnattachedParentConditions, j as findCondition, k as updateCondition, l as setBlockSelection, m as cleanCustomFormFieldSlides, t as translateAll, n as cleanUnattachedParentConditions, o as removeSelectedItems, p as setSelectedScoring, q as getFieldsWithScoring, v as populateFieldsWithScoring, w as setFormFieldIndex, x as setParentConditions, y as updateUnattatchedCondition, z as doesSlidePageHaveItems, A as getNumberOfSequentialFields, B as getDefaultCondition, C as addNewParentCondition, D as createNewIdsForCustomFields, E as getDefaultField, F as getScoringQuickSetupData, G as checkForFieldAttribute, H as populateMissingValues, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-c7d9c582.js';
10
10
  import { a_ as updateTranslationKey, a$ as checkIfKeyIsInPage, t as translate, aj as showAlert, b0 as removeScoringSelectedFields, b1 as serializeScores, b2 as setFieldIconAndCategory, a3 as translateMulti, b3 as findField, b4 as CURVE_EASE_OUT_QUAD, b5 as changeSelectedScoring, k as isNullOrUndefined, b6 as hasImageRecognitionFields, aU as getUUID, aA as getCurrentLanguage, b7 as calculateScoringTotal, b8 as formatSlides, G as showModal, b9 as showToast, ba as checkIfKeyIsInField, bb as removeParentCondition, bc as populateScoringFields, bd as isFieldNameUnique, be as getCustomName, a8 as getSession, w as closeModal, bf as getScoringCategory, bg as formatScoringValuePairs, bh as findMultiMaxScore } from './index-998eec90.js';
11
11
  import { c as conditionBlocksConfig } from './form-field.instance-9dc4d638.js';
12
12
  import './workflow.interface-79064a52.js';
@@ -831,7 +831,7 @@ const YooFormDynamicComponent = class {
831
831
  lockSwipes(this.ionSlides, true);
832
832
  }
833
833
  // Disabled this because of the warnings from stencil , not sure we still need it
834
- if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !['form-creator-announcement', 'form-creator-block'].includes(this.formType) && !(this.isMission() && !isWeb(this.host))) {
834
+ if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !this.shouldUseTranslations() && !(this.isMission() && !isWeb(this.host))) {
835
835
  this.updateState(true);
836
836
  }
837
837
  this.host.classList.remove('no-initial-height');
@@ -1006,7 +1006,7 @@ const YooFormDynamicComponent = class {
1006
1006
  return this.formType === 'workflow' || this.formType === 'form-creator-preview-workflow';
1007
1007
  }
1008
1008
  isFormCreatorBlock() {
1009
- return this.formType === 'form-creator-block';
1009
+ return this.formType === 'form-creator-block' || this.formType === 'lesson-creator-block';
1010
1010
  }
1011
1011
  shouldUseTranslations() {
1012
1012
  return this.isFormCreatorBlock() || this.formType === 'form-creator-announcement';
@@ -2166,7 +2166,7 @@ const YooFormDynamicComponent = class {
2166
2166
  }
2167
2167
  }
2168
2168
  onTabSelected(ev) {
2169
- if (!this.isLivePreview() && this.formType !== 'form-creator-block') {
2169
+ if (!this.isLivePreview() && !this.isFormCreatorBlock()) {
2170
2170
  this.selectedTabIndexState = -1;
2171
2171
  }
2172
2172
  else {
@@ -3288,7 +3288,7 @@ const YooFormDynamicComponent = class {
3288
3288
  extraAttrs = {
3289
3289
  min: field.min,
3290
3290
  max: field.max,
3291
- allowDecimals: field.allowDecimals,
3291
+ allowDecimals: isFunction(field.allowDecimals) ? field.allowDecimals(this.host) : field.allowDecimals,
3292
3292
  maxCharacters: field.maxCharacters,
3293
3293
  type: field.type === FormFieldType.number && isSamsung() ? FormFieldType.text : getInputType(field),
3294
3294
  inputmode: field.type === FormFieldType.number && isSamsung() ? 'numeric' : '',
@@ -4,7 +4,7 @@ import { n as compact } from './lodash-777f91de.js';
4
4
  import { W as WorkflowMode } from './workflow.interface-79064a52.js';
5
5
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
6
6
  import { A as ARROW_PAIR } from './index-c3215c3c.js';
7
- import { P as onWorkflowStepClicked, Q as getWorkflowFieldState } from './index-61ca11b9.js';
7
+ import { P as onWorkflowStepClicked, Q as getWorkflowFieldState } from './index-c7d9c582.js';
8
8
  import { f as fieldStateOptions } from './index-a7443ef7.js';
9
9
  import { t as translate } from './index-998eec90.js';
10
10
  import './index-4bbbf966.js';
@@ -337,6 +337,9 @@ function getDefaultField(field, type) {
337
337
  if (type === 'lesson') {
338
338
  newField.required = true;
339
339
  }
340
+ if (type === 'mission' && [FormFieldType.number, FormFieldType.slider].includes(field.type)) {
341
+ newField.allowDecimals = true;
342
+ }
340
343
  return newField;
341
344
  }
342
345
  function setParentConditions(slides) {
@@ -3,7 +3,7 @@ import { Y as FORM_CREATOR_OPTIONS_ALL, A as ALL_MOBILE_FORM_FIELDS, u as FormFi
3
3
  import './index-0b3d2e69.js';
4
4
  import { n as compact } from './lodash-777f91de.js';
5
5
  import { N as NON_CONDITION_CATEGORIES, a as NON_CONDITION_TYPES } from './index-c3215c3c.js';
6
- import { l as setBlockSelection, S as setRestrictionAndConditionActions, T as filterSequentialFields, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-61ca11b9.js';
6
+ import { l as setBlockSelection, S as setRestrictionAndConditionActions, T as filterSequentialFields, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-c7d9c582.js';
7
7
  import { k as isNullOrUndefined, I as debounce, t as translate, aW as gsapTo, aX as gsapSet, dr as Power3, aY as gsapFromTo, a3 as translateMulti } from './index-998eec90.js';
8
8
  import './annotations-helpers-f7b42b40.js';
9
9
  import './_commonjsHelpers-f4d11124.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, i as createEvent, f as forceUpdate, h, e as Host
2
2
  import { A as ALL_MOBILE_FORM_FIELDS } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
4
  import { f as feedbackValues } from './index-2319a076.js';
5
- import { l as setBlockSelection, U as setPageSelection } from './index-61ca11b9.js';
5
+ import { l as setBlockSelection, U as setPageSelection } from './index-c7d9c582.js';
6
6
  import { t as translate, k as isNullOrUndefined, a3 as translateMulti } from './index-998eec90.js';
7
7
  import './lodash-777f91de.js';
8
8
  import './annotations-helpers-f7b42b40.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { S as Sortable } from './sortable.esm-f788d1ca.js';
4
- import { I as setRestrictionAndFieldConditions, Q as getWorkflowFieldState } from './index-61ca11b9.js';
4
+ import { I as setRestrictionAndFieldConditions, Q as getWorkflowFieldState } from './index-c7d9c582.js';
5
5
  import { k as isNullOrUndefined, a3 as translateMulti, t as translate } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './index-4bbbf966.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, i as createEvent, h } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
- import { S as setRestrictionAndConditionActions } from './index-61ca11b9.js';
3
+ import { S as setRestrictionAndConditionActions } from './index-c7d9c582.js';
4
4
  import { t as translate } from './index-998eec90.js';
5
5
  import './lodash-777f91de.js';
6
6
  import './index-4bbbf966.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import { Y as FORM_CREATOR_OPTIONS_ALL, S as ScoringCategory, A as ALL_MOBILE_FORM_FIELDS, c as FormFieldType, T as TRUE_PRESENCE_VALUE_TEXT, e as FALSE_PRESENCE_VALUE_TEXT } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
- import { K as starRatingMaxDefault } from './index-61ca11b9.js';
4
+ import { K as starRatingMaxDefault } from './index-c7d9c582.js';
5
5
  import { k as isNullOrUndefined, aW as gsapTo, dr as Power3, aY as gsapFromTo, ds as findMaxScore, a3 as translateMulti, t as translate, dt as isNotApplicable } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './annotations-helpers-f7b42b40.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, i as createEvent, h, e as Host, g as getElement
2
2
  import { f as TRANSLATABLE_FORM_FIELD_ATTRIBUTES, c as FormFieldType, C as COMPLEX_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES, g as SINGLE_ARRAY_TRANSLATABLE_FORM_FIELD_ATTRIBUTES } from './index-4bbbf966.js';
3
3
  import './index-0b3d2e69.js';
4
4
  import { n as compact, c as cloneDeep, v as isObject, y as isEmpty, p as isString } from './lodash-777f91de.js';
5
- import { R as updateLocaleTranslation } from './index-61ca11b9.js';
5
+ import { R as updateLocaleTranslation } from './index-c7d9c582.js';
6
6
  import { I as debounce, b8 as formatSlides, aA as getCurrentLanguage, dH as getLocaleTranslation, dI as isHTML, a3 as translateMulti, t as translate, b3 as findField, w as closeModal, dq as getTranslateLanguageKeys } from './index-998eec90.js';
7
7
  import './annotations-helpers-f7b42b40.js';
8
8
  import './_commonjsHelpers-f4d11124.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { c as cloneDeep, A as isEqual, a0 as remove } from './lodash-777f91de.js';
4
- import { L as resetKey, M as resetFieldTranslations, t as translateAll, N as isAlreadyTranslated, O as addRow } from './index-61ca11b9.js';
4
+ import { L as resetKey, M as resetFieldTranslations, t as translateAll, N as isAlreadyTranslated, O as addRow } from './index-c7d9c582.js';
5
5
  import { b8 as formatSlides, du as cleanUnusedTranslations, dq as getTranslateLanguageKeys, b6 as hasImageRecognitionFields, k as isNullOrUndefined, t as translate, d0 as getAuthentication, ay as getLanguageKey, aj as showAlert, w as closeModal, dv as updateScoringWithTranslations, dw as updateAuditWithTranslations, G as showModal } from './index-998eec90.js';
6
6
  import './index-4bbbf966.js';
7
7
  import './annotations-helpers-f7b42b40.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import './index-0b3d2e69.js';
3
3
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
4
- import { P as onWorkflowStepClicked } from './index-61ca11b9.js';
4
+ import { P as onWorkflowStepClicked } from './index-c7d9c582.js';
5
5
  import { t as translate } from './index-998eec90.js';
6
6
  import './lodash-777f91de.js';
7
7
  import './index-4bbbf966.js';
@@ -6,7 +6,7 @@ import { S as Sortable } from './sortable.esm-f788d1ca.js';
6
6
  import { F as FORM_CREATOR_BULK_ACTIONS_ALL } from './index-c04e931c.js';
7
7
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
8
8
  import { N as NON_CONDITION_CATEGORIES, a as NON_CONDITION_TYPES, A as ARROW_PAIR } from './index-c3215c3c.js';
9
- import { a as addNewIdsToSlide, s as serializeScoringValuePairs, u as updateSelectedFields, i as isScoring, g as getExpandableBlockReference, r as removeCondition, b as removePageCondtion, c as addNewUnattachedParentConditions, d as deleteFieldAndRemoveConditionReferences, e as duplicateField, f as deleteCondition, h as deleteUnattachedParentConditions, j as findCondition, k as updateCondition, l as setBlockSelection, m as cleanCustomFormFieldSlides, t as translateAll, n as cleanUnattachedParentConditions, o as removeSelectedItems, p as setSelectedScoring, q as getFieldsWithScoring, v as populateFieldsWithScoring, w as setFormFieldIndex, x as setParentConditions, y as updateUnattatchedCondition, z as doesSlidePageHaveItems, A as getNumberOfSequentialFields, B as getDefaultCondition, C as addNewParentCondition, D as createNewIdsForCustomFields, E as getDefaultField, F as getScoringQuickSetupData, G as checkForFieldAttribute, H as populateMissingValues, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-61ca11b9.js';
9
+ import { a as addNewIdsToSlide, s as serializeScoringValuePairs, u as updateSelectedFields, i as isScoring, g as getExpandableBlockReference, r as removeCondition, b as removePageCondtion, c as addNewUnattachedParentConditions, d as deleteFieldAndRemoveConditionReferences, e as duplicateField, f as deleteCondition, h as deleteUnattachedParentConditions, j as findCondition, k as updateCondition, l as setBlockSelection, m as cleanCustomFormFieldSlides, t as translateAll, n as cleanUnattachedParentConditions, o as removeSelectedItems, p as setSelectedScoring, q as getFieldsWithScoring, v as populateFieldsWithScoring, w as setFormFieldIndex, x as setParentConditions, y as updateUnattatchedCondition, z as doesSlidePageHaveItems, A as getNumberOfSequentialFields, B as getDefaultCondition, C as addNewParentCondition, D as createNewIdsForCustomFields, E as getDefaultField, F as getScoringQuickSetupData, G as checkForFieldAttribute, H as populateMissingValues, I as setRestrictionAndFieldConditions, J as setChildFields } from './index-c7d9c582.js';
10
10
  import { a_ as updateTranslationKey, a$ as checkIfKeyIsInPage, t as translate, aj as showAlert, b0 as removeScoringSelectedFields, b1 as serializeScores, b2 as setFieldIconAndCategory, a3 as translateMulti, b3 as findField, b4 as CURVE_EASE_OUT_QUAD, b5 as changeSelectedScoring, k as isNullOrUndefined, b6 as hasImageRecognitionFields, aU as getUUID, aA as getCurrentLanguage, b7 as calculateScoringTotal, b8 as formatSlides, G as showModal, b9 as showToast, ba as checkIfKeyIsInField, bb as removeParentCondition, bc as populateScoringFields, bd as isFieldNameUnique, be as getCustomName, a8 as getSession, w as closeModal, bf as getScoringCategory, bg as formatScoringValuePairs, bh as findMultiMaxScore } from './index-998eec90.js';
11
11
  import { c as conditionBlocksConfig } from './form-field.instance-9dc4d638.js';
12
12
  import './workflow.interface-79064a52.js';
@@ -831,7 +831,7 @@ const YooFormDynamicComponent = class {
831
831
  lockSwipes(this.ionSlides, true);
832
832
  }
833
833
  // Disabled this because of the warnings from stencil , not sure we still need it
834
- if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !['form-creator-announcement', 'form-creator-block'].includes(this.formType) && !(this.isMission() && !isWeb(this.host))) {
834
+ if ((this.showTabs || this.showVerticalTabs) && !this.isLivePreview() && !this.shouldUseTranslations() && !(this.isMission() && !isWeb(this.host))) {
835
835
  this.updateState(true);
836
836
  }
837
837
  this.host.classList.remove('no-initial-height');
@@ -1006,7 +1006,7 @@ const YooFormDynamicComponent = class {
1006
1006
  return this.formType === 'workflow' || this.formType === 'form-creator-preview-workflow';
1007
1007
  }
1008
1008
  isFormCreatorBlock() {
1009
- return this.formType === 'form-creator-block';
1009
+ return this.formType === 'form-creator-block' || this.formType === 'lesson-creator-block';
1010
1010
  }
1011
1011
  shouldUseTranslations() {
1012
1012
  return this.isFormCreatorBlock() || this.formType === 'form-creator-announcement';
@@ -2166,7 +2166,7 @@ const YooFormDynamicComponent = class {
2166
2166
  }
2167
2167
  }
2168
2168
  onTabSelected(ev) {
2169
- if (!this.isLivePreview() && this.formType !== 'form-creator-block') {
2169
+ if (!this.isLivePreview() && !this.isFormCreatorBlock()) {
2170
2170
  this.selectedTabIndexState = -1;
2171
2171
  }
2172
2172
  else {
@@ -3288,7 +3288,7 @@ const YooFormDynamicComponent = class {
3288
3288
  extraAttrs = {
3289
3289
  min: field.min,
3290
3290
  max: field.max,
3291
- allowDecimals: field.allowDecimals,
3291
+ allowDecimals: isFunction(field.allowDecimals) ? field.allowDecimals(this.host) : field.allowDecimals,
3292
3292
  maxCharacters: field.maxCharacters,
3293
3293
  type: field.type === FormFieldType.number && isSamsung() ? FormFieldType.text : getInputType(field),
3294
3294
  inputmode: field.type === FormFieldType.number && isSamsung() ? 'numeric' : '',
@@ -4,7 +4,7 @@ import { n as compact } from './lodash-777f91de.js';
4
4
  import { W as WorkflowMode } from './workflow.interface-79064a52.js';
5
5
  import { g as getAppContext } from './common-helpers-e1ab61d3.js';
6
6
  import { A as ARROW_PAIR } from './index-c3215c3c.js';
7
- import { P as onWorkflowStepClicked, Q as getWorkflowFieldState } from './index-61ca11b9.js';
7
+ import { P as onWorkflowStepClicked, Q as getWorkflowFieldState } from './index-c7d9c582.js';
8
8
  import { f as fieldStateOptions } from './index-a7443ef7.js';
9
9
  import { t as translate } from './index-998eec90.js';
10
10
  import './index-4bbbf966.js';
@@ -64,7 +64,7 @@ export interface IFormField {
64
64
  descriptionDynamic?: IDynamicProperty;
65
65
  caption?: string;
66
66
  sanitizeValue?: boolean;
67
- allowDecimals?: boolean;
67
+ allowDecimals?: boolean | ((form?: HTMLYooFormDynamicElement) => boolean);
68
68
  name?: string;
69
69
  customName?: string;
70
70
  disabled?: boolean | string | ICondition | ICondition[];
@@ -53,4 +53,4 @@ export interface IFormSlideData {
53
53
  hasFeedback?: boolean;
54
54
  }
55
55
  export declare const MAX_FORM_TRANSLATE_VALUE = 5000;
56
- export declare type FormDynamicType = TMissionType | 'workflow' | 'form-creator-preview' | 'form-creator-preview-lesson' | 'form-creator-preview-workflow' | 'form-creator-preview-kanban' | 'form-creator-block' | 'form-creator-announcement' | 'lesson-detail' | 'lesson-question-result' | 'mission-validation' | 'waitlist';
56
+ export declare type FormDynamicType = TMissionType | 'workflow' | 'form-creator-preview' | 'form-creator-preview-lesson' | 'form-creator-preview-workflow' | 'form-creator-preview-kanban' | 'form-creator-block' | 'form-creator-announcement' | 'lesson-creator-block' | 'lesson-detail' | 'lesson-question-result' | 'mission-validation' | 'waitlist';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "8.5.11",
3
+ "version": "8.5.12",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",