@yoobic/yobi 8.5.2-0 → 8.5.2

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.
@@ -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);
@@ -429,7 +429,7 @@ svg:not(:root) {
429
429
  --bottom-container-padding: 0;
430
430
  }
431
431
  :host yoo-navbar.hide-tags yoo-entity-search-tags {
432
- margin: 0 var(--spacing-08, 0.5rem);
432
+ margin: 0;
433
433
  }
434
434
  :host yoo-navbar.hide-tags.hide-filters {
435
435
  --top-container-padding: 0.75rem var(--spacing-08, 0.5rem);
@@ -2209,9 +2209,8 @@ export class YooGridComponent {
2209
2209
  })))), isWeb(this.host) && (h("div", { class: "nav-bar-entity-right", slot: "before-sort" }, h("slot", { name: "nav-bar-entity-right" }))), h("slot", { name: "search-buttons" })));
2210
2210
  }
2211
2211
  renderEntitySearchTags(renderSearchOrAutocomplete) {
2212
- var _a;
2213
2212
  const showAdvancedFilters = (!isWeb(this.host) && this.showSearch !== false) || (isWeb(this.host) && !!this.model) || this.forceTagFilters;
2214
- return ((_a = this.tags) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("yoo-entity-search-tags", { slot: this.hideTags || !this.tags || (this.tags && this.tags.length === 0) ? 'start' : renderSearchOrAutocomplete ? 'content' : '', expandedTags: this.gridIsExpanded, hideTags: this.hideTags || !this.tags || !this.tags.length, sortsAndFilters: this.sortsAndFilters, onFilterAdvanced: () => this.onShowFilterAdvanced(), tags: isWeb(this.host) && !this.gridIsExpanded ? [] : this.tags, values: this.selectedTags || [], hideAdvancedFilters: !showAdvancedFilters || this.isShowAdvancedFiltersDisplayedIntoSearch, onSelected: (ev) => this.onTagSelect(ev), disabled: this.isSelectAll }));
2213
+ return (h("yoo-entity-search-tags", { slot: this.hideTags || !this.tags || (this.tags && this.tags.length === 0) ? 'start' : renderSearchOrAutocomplete ? 'content' : '', expandedTags: this.gridIsExpanded, hideTags: this.hideTags || !this.tags || !this.tags.length, sortsAndFilters: this.sortsAndFilters, onFilterAdvanced: () => this.onShowFilterAdvanced(), tags: isWeb(this.host) && !this.gridIsExpanded ? [] : this.tags, values: this.selectedTags || [], hideAdvancedFilters: !showAdvancedFilters || this.isShowAdvancedFiltersDisplayedIntoSearch, onSelected: (ev) => this.onTagSelect(ev), disabled: this.isSelectAll }));
2215
2214
  }
2216
2215
  onTabSelected(ev) {
2217
2216
  this.selectedTab = this.tabs[ev.detail.nextIndex];
@@ -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);