@yoobic/yobi 8.5.2-0 → 8.5.2-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.
@@ -1366,7 +1366,8 @@ const YooFormCreatorComponent = class {
1366
1366
  chosenClass: 'sortable-chosen-no-border',
1367
1367
  direction: 'vertical',
1368
1368
  draggable: '.sortable-container',
1369
- filter: '.selection',
1369
+ filter: (event) => event.composedPath().some((element) => { var _a; return element.tagName === 'INPUT' || ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains('selection')); }),
1370
+ preventOnFilter: false,
1370
1371
  scroll: true,
1371
1372
  swapThreshold: 0.2,
1372
1373
  // scrollSensitivity: 1000,
@@ -2357,11 +2358,14 @@ const YooFormCreatorComponent = class {
2357
2358
  var _a;
2358
2359
  if (((_a = this.currentExpandableFieldSortable) === null || _a === void 0 ? void 0 : _a.sort) && this.currentSlides && this.currentSlides[this.selectedPageIndex] && this.currentSlides[this.selectedPageIndex].items) {
2359
2360
  const order = this.currentSlides[this.selectedPageIndex].items.filter((f) => f).map((f) => f.name);
2360
- try {
2361
- this.currentExpandableFieldSortable.sort(order);
2362
- }
2363
- catch (err) {
2364
- // do nothing
2361
+ if (!lodash.isEqual(order, this.currentExpandableFieldSortableOrder)) {
2362
+ try {
2363
+ this.currentExpandableFieldSortableOrder = order;
2364
+ this.currentExpandableFieldSortable.sort(order);
2365
+ }
2366
+ catch (err) {
2367
+ // do nothing
2368
+ }
2365
2369
  }
2366
2370
  }
2367
2371
  }, 0);
@@ -1,7 +1,7 @@
1
1
  import { ALL_MOBILE_FORM_FIELDS, CONDITION_TYPES, FEEDBACK_SCORING_VALUES, FormCreatorBulkActions, FormCreatorOptions, FormFieldCategory, FormFieldType, ScoringCategory } from '@shared/interfaces';
2
2
  import { calculateScoringTotal, changeSelectedScoring, checkIfKeyIsInField, checkIfKeyIsInPage, closeModal, CURVE_EASE_OUT_QUAD, findField, findMultiMaxScore, formatScoringValuePairs, formatSlides, getCurrentLanguage, getCustomName, getScoringCategory, getSession, getUUID, hasImageRecognitionFields, isFieldNameUnique, isNullOrUndefined, populateScoringFields, removeParentCondition, removeScoringSelectedFields, serializeScores, setFieldIconAndCategory, showAlert, showModal, showToast, translate, translateMulti, updateTranslationKey } from '@shared/utils';
3
3
  import { forceUpdate, h, Host } from '@stencil/core';
4
- import { cloneDeep, compact, isArray, orderBy } from 'lodash-es';
4
+ import { cloneDeep, compact, isArray, isEqual, orderBy } from 'lodash-es';
5
5
  import Sortable from 'sortablejs';
6
6
  import { conditionBlocksConfig, FORM_CREATOR_BULK_ACTIONS_ALL } from '../../../interfaces';
7
7
  import { getAppContext } from '../../../utils/helpers/common-helpers';
@@ -1293,7 +1293,8 @@ export class YooFormCreatorComponent {
1293
1293
  chosenClass: 'sortable-chosen-no-border',
1294
1294
  direction: 'vertical',
1295
1295
  draggable: '.sortable-container',
1296
- filter: '.selection',
1296
+ filter: (event) => event.composedPath().some((element) => { var _a; return element.tagName === 'INPUT' || ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains('selection')); }),
1297
+ preventOnFilter: false,
1297
1298
  scroll: true,
1298
1299
  swapThreshold: 0.2,
1299
1300
  // scrollSensitivity: 1000,
@@ -2284,11 +2285,14 @@ export class YooFormCreatorComponent {
2284
2285
  var _a;
2285
2286
  if (((_a = this.currentExpandableFieldSortable) === null || _a === void 0 ? void 0 : _a.sort) && this.currentSlides && this.currentSlides[this.selectedPageIndex] && this.currentSlides[this.selectedPageIndex].items) {
2286
2287
  const order = this.currentSlides[this.selectedPageIndex].items.filter((f) => f).map((f) => f.name);
2287
- try {
2288
- this.currentExpandableFieldSortable.sort(order);
2289
- }
2290
- catch (err) {
2291
- // do nothing
2288
+ if (!isEqual(order, this.currentExpandableFieldSortableOrder)) {
2289
+ try {
2290
+ this.currentExpandableFieldSortableOrder = order;
2291
+ this.currentExpandableFieldSortable.sort(order);
2292
+ }
2293
+ catch (err) {
2294
+ // do nothing
2295
+ }
2292
2296
  }
2293
2297
  }
2294
2298
  }, 0);
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, f as forceUpdate, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import { s as FormCreatorOptions, A as ALL_MOBILE_FORM_FIELDS, c as FormFieldType, t as CONDITION_TYPES, u as FormFieldCategory, v as FormCreatorBulkActions, w as FEEDBACK_SCORING_VALUES, S as ScoringCategory } from './index-4bbbf966.js';
3
3
  import './index-79495ce8.js';
4
- import { c as cloneDeep, o as orderBy, n as compact, i as isArray } from './lodash-777f91de.js';
4
+ import { c as cloneDeep, o as orderBy, n as compact, i as isArray, A as isEqual } from './lodash-777f91de.js';
5
5
  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-d0ae29f8.js';
@@ -1362,7 +1362,8 @@ const YooFormCreatorComponent = class {
1362
1362
  chosenClass: 'sortable-chosen-no-border',
1363
1363
  direction: 'vertical',
1364
1364
  draggable: '.sortable-container',
1365
- filter: '.selection',
1365
+ filter: (event) => event.composedPath().some((element) => { var _a; return element.tagName === 'INPUT' || ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains('selection')); }),
1366
+ preventOnFilter: false,
1366
1367
  scroll: true,
1367
1368
  swapThreshold: 0.2,
1368
1369
  // scrollSensitivity: 1000,
@@ -2353,11 +2354,14 @@ const YooFormCreatorComponent = class {
2353
2354
  var _a;
2354
2355
  if (((_a = this.currentExpandableFieldSortable) === null || _a === void 0 ? void 0 : _a.sort) && this.currentSlides && this.currentSlides[this.selectedPageIndex] && this.currentSlides[this.selectedPageIndex].items) {
2355
2356
  const order = this.currentSlides[this.selectedPageIndex].items.filter((f) => f).map((f) => f.name);
2356
- try {
2357
- this.currentExpandableFieldSortable.sort(order);
2358
- }
2359
- catch (err) {
2360
- // do nothing
2357
+ if (!isEqual(order, this.currentExpandableFieldSortableOrder)) {
2358
+ try {
2359
+ this.currentExpandableFieldSortableOrder = order;
2360
+ this.currentExpandableFieldSortable.sort(order);
2361
+ }
2362
+ catch (err) {
2363
+ // do nothing
2364
+ }
2361
2365
  }
2362
2366
  }
2363
2367
  }, 0);
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, i as createEvent, f as forceUpdate, h, e as Host, g as getElement } from './index-a6a92b3d.js';
2
2
  import { s as FormCreatorOptions, A as ALL_MOBILE_FORM_FIELDS, c as FormFieldType, t as CONDITION_TYPES, u as FormFieldCategory, v as FormCreatorBulkActions, w as FEEDBACK_SCORING_VALUES, S as ScoringCategory } from './index-4bbbf966.js';
3
3
  import './index-79495ce8.js';
4
- import { c as cloneDeep, o as orderBy, n as compact, i as isArray } from './lodash-777f91de.js';
4
+ import { c as cloneDeep, o as orderBy, n as compact, i as isArray, A as isEqual } from './lodash-777f91de.js';
5
5
  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-d0ae29f8.js';
@@ -1362,7 +1362,8 @@ const YooFormCreatorComponent = class {
1362
1362
  chosenClass: 'sortable-chosen-no-border',
1363
1363
  direction: 'vertical',
1364
1364
  draggable: '.sortable-container',
1365
- filter: '.selection',
1365
+ filter: (event) => event.composedPath().some((element) => { var _a; return element.tagName === 'INPUT' || ((_a = element.classList) === null || _a === void 0 ? void 0 : _a.contains('selection')); }),
1366
+ preventOnFilter: false,
1366
1367
  scroll: true,
1367
1368
  swapThreshold: 0.2,
1368
1369
  // scrollSensitivity: 1000,
@@ -2353,11 +2354,14 @@ const YooFormCreatorComponent = class {
2353
2354
  var _a;
2354
2355
  if (((_a = this.currentExpandableFieldSortable) === null || _a === void 0 ? void 0 : _a.sort) && this.currentSlides && this.currentSlides[this.selectedPageIndex] && this.currentSlides[this.selectedPageIndex].items) {
2355
2356
  const order = this.currentSlides[this.selectedPageIndex].items.filter((f) => f).map((f) => f.name);
2356
- try {
2357
- this.currentExpandableFieldSortable.sort(order);
2358
- }
2359
- catch (err) {
2360
- // do nothing
2357
+ if (!isEqual(order, this.currentExpandableFieldSortableOrder)) {
2358
+ try {
2359
+ this.currentExpandableFieldSortableOrder = order;
2360
+ this.currentExpandableFieldSortable.sort(order);
2361
+ }
2362
+ catch (err) {
2363
+ // do nothing
2364
+ }
2361
2365
  }
2362
2366
  }
2363
2367
  }, 0);
@@ -364,6 +364,7 @@ export declare class YooFormCreatorComponent {
364
364
  private expandableBlocks;
365
365
  private fieldEmptyStateContainer;
366
366
  private currentExpandableFieldSortable;
367
+ private currentExpandableFieldSortableOrder;
367
368
  private leftMenuSortables;
368
369
  private hasPageChanged;
369
370
  private hasLeftMenuOptionChanged;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "8.5.2-0",
3
+ "version": "8.5.2-1",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",