@yoobic/yobi 8.7.36 → 8.7.37
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.
- package/dist/cjs/yoo-form-uploader.cjs.entry.js +1 -1
- package/dist/cjs/yoo-grid.cjs.entry.js +6 -0
- package/dist/collection/components/form/form-uploader/form-uploader.js +2 -2
- package/dist/collection/components/grid/grid/grid.js +7 -1
- package/dist/design-system/yoo-form-uploader.entry.js +2 -2
- package/dist/design-system/yoo-grid.entry.js +7 -1
- package/dist/esm/yoo-form-uploader.entry.js +2 -2
- package/dist/esm/yoo-grid.entry.js +7 -1
- package/package.json +1 -1
@@ -17149,7 +17149,7 @@ const YooFormUploaderComponent = class {
|
|
17149
17149
|
allowFileSizeValidation: true,
|
17150
17150
|
maxFileSize: this.maxFileSize,
|
17151
17151
|
maxTotalFileSize: null,
|
17152
|
-
allowMultiple: this.multiple
|
17152
|
+
allowMultiple: this.multiple,
|
17153
17153
|
className: this.cssClass ? this.cssClass : '',
|
17154
17154
|
acceptedFileTypes: this.extensions ? this.extensions.map((ext) => ((ext === null || ext === void 0 ? void 0 : ext.includes) && ext.includes('/') ? ext : index$1.getMimeType(ext))) : [],
|
17155
17155
|
fileValidateTypeDetectType: (source, type) => new Promise((resolve) => {
|
@@ -492,6 +492,12 @@ const YooGridComponent = class {
|
|
492
492
|
async updateValues(values, total, gridCurrentSearch) {
|
493
493
|
if (this.isFormField) {
|
494
494
|
this.items = [].concat(this.items || []).concat(values || []);
|
495
|
+
if ((values === null || values === void 0 ? void 0 : values.length) > 0 && lodash.isObject(values[0])) {
|
496
|
+
this.items = lodash.uniqBy(this.items, (d) => d[this.idAttributeName || '_id']);
|
497
|
+
}
|
498
|
+
else {
|
499
|
+
this.items = lodash.uniqBy(this.items, (d) => d);
|
500
|
+
}
|
495
501
|
}
|
496
502
|
else {
|
497
503
|
this.items = values;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FormFieldType } from '@shared/interfaces';
|
2
|
-
import { getFileByPath, getMimeType,
|
2
|
+
import { getFileByPath, getMimeType, isBlob, isFile, isNativeFilePath, isNativeMobile, isWeb, saveToLocalFile, translate, urlToFileBlob } from '@shared/utils';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { getAppContext } from '@yobi/utils/helpers/common-helpers';
|
5
5
|
import { setValueAndValidateInput } from '@yobi/utils/helpers/form-input-helpers';
|
@@ -191,7 +191,7 @@ export class YooFormUploaderComponent {
|
|
191
191
|
allowFileSizeValidation: true,
|
192
192
|
maxFileSize: this.maxFileSize,
|
193
193
|
maxTotalFileSize: null,
|
194
|
-
allowMultiple: this.multiple
|
194
|
+
allowMultiple: this.multiple,
|
195
195
|
className: this.cssClass ? this.cssClass : '',
|
196
196
|
acceptedFileTypes: this.extensions ? this.extensions.map((ext) => ((ext === null || ext === void 0 ? void 0 : ext.includes) && ext.includes('/') ? ext : getMimeType(ext))) : [],
|
197
197
|
fileValidateTypeDetectType: (source, type) => new Promise((resolve) => {
|
@@ -9,7 +9,7 @@ import { removeEntitiesWithIds } from '@yobi/utils/helpers/entities-helpers';
|
|
9
9
|
import { isKanbanColumnField, mapCustomViewToButton } from '@yobi/utils/helpers/filters-helpers';
|
10
10
|
import { setValidator, setValueAndValidateInput } from '@yobi/utils/helpers/form-input-helpers';
|
11
11
|
import { isEmail } from '@yobi/utils/helpers/text-helpers';
|
12
|
-
import { compact, debounce, findIndex, get, isArray, isBoolean, isEmpty, isEqual, isFunction, isNil, isNumber, isObject, isString, map, range, sortBy, sum, throttle, uniqWith } from 'lodash-es';
|
12
|
+
import { compact, debounce, findIndex, get, isArray, isBoolean, isEmpty, isEqual, isFunction, isNil, isNumber, isObject, isString, map, range, sortBy, sum, throttle, uniqBy, uniqWith } from 'lodash-es';
|
13
13
|
import Sortable from 'sortablejs';
|
14
14
|
import { getRenderer } from '../ag-grid/grid-renderers';
|
15
15
|
import { shouldUseVirtualScroll } from './grid-helper';
|
@@ -409,6 +409,12 @@ export class YooGridComponent {
|
|
409
409
|
async updateValues(values, total, gridCurrentSearch) {
|
410
410
|
if (this.isFormField) {
|
411
411
|
this.items = [].concat(this.items || []).concat(values || []);
|
412
|
+
if ((values === null || values === void 0 ? void 0 : values.length) > 0 && isObject(values[0])) {
|
413
|
+
this.items = uniqBy(this.items, (d) => d[this.idAttributeName || '_id']);
|
414
|
+
}
|
415
|
+
else {
|
416
|
+
this.items = uniqBy(this.items, (d) => d);
|
417
|
+
}
|
412
418
|
}
|
413
419
|
else {
|
414
420
|
this.items = values;
|
@@ -5,7 +5,7 @@ import { g as getAppContext } from './common-helpers-5e93c41f.js';
|
|
5
5
|
import { s as setValueAndValidateInput } from './form-input-helpers-a8832c0e.js';
|
6
6
|
import { a as createCommonjsModule, c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-f4d11124.js';
|
7
7
|
import { a as isArray } from './lodash-04b11500.js';
|
8
|
-
import { X as isNativeFilePath, eE as getFileByPath, av as isFile, d3 as urlToFileBlob, l as isNativeMobile, eF as isBlob, A as saveToLocalFile,
|
8
|
+
import { X as isNativeFilePath, eE as getFileByPath, av as isFile, d3 as urlToFileBlob, l as isNativeMobile, eF as isBlob, A as saveToLocalFile, dZ as getMimeType, t as translate, H as isWeb } from './index-421dbe45.js';
|
9
9
|
|
10
10
|
var filepond = createCommonjsModule(function (module, exports) {
|
11
11
|
/*!
|
@@ -17145,7 +17145,7 @@ const YooFormUploaderComponent = class {
|
|
17145
17145
|
allowFileSizeValidation: true,
|
17146
17146
|
maxFileSize: this.maxFileSize,
|
17147
17147
|
maxTotalFileSize: null,
|
17148
|
-
allowMultiple: this.multiple
|
17148
|
+
allowMultiple: this.multiple,
|
17149
17149
|
className: this.cssClass ? this.cssClass : '',
|
17150
17150
|
acceptedFileTypes: this.extensions ? this.extensions.map((ext) => ((ext === null || ext === void 0 ? void 0 : ext.includes) && ext.includes('/') ? ext : getMimeType(ext))) : [],
|
17151
17151
|
fileValidateTypeDetectType: (source, type) => new Promise((resolve) => {
|
@@ -9,7 +9,7 @@ import { r as removeEntitiesWithIds } from './entities-helpers-5a6501ff.js';
|
|
9
9
|
import { m as mapCustomViewToButton, l as isKanbanColumnField } from './filters-helpers-3ab9ed00.js';
|
10
10
|
import { a as setValidator, s as setValueAndValidateInput } from './form-input-helpers-a8832c0e.js';
|
11
11
|
import { i as isEmail } from './text-helpers-a008b4db.js';
|
12
|
-
import { a0 as debounce, ad as throttle, i as isNil, f as isEqual, o as map, D as sortBy, a as isArray, B as isEmpty, ae as uniqWith, e as compact, E as get, r as isString, b as isNumber, I as isBoolean, V as findIndex, a7 as sum, S as range,
|
12
|
+
import { a0 as debounce, ad as throttle, i as isNil, f as isEqual, z as isObject, $ as uniqBy, o as map, D as sortBy, a as isArray, B as isEmpty, ae as uniqWith, e as compact, E as get, r as isString, b as isNumber, I as isBoolean, V as findIndex, a7 as sum, S as range, h as isFunction } from './lodash-04b11500.js';
|
13
13
|
import { S as Sortable } from './sortable.esm-f788d1ca.js';
|
14
14
|
import { b as getRenderer } from './grid-renderers-2eed8577.js';
|
15
15
|
import { l as isNativeMobile, eG as HorizontalSlidesAnimation, H as isWeb, r as pipes, e2 as safeScrollIntoView, V as getAsyncExtraData, bK as filterListByText, ag as getSession, d0 as isAnimationsDisabled, eH as isMapField, t as translate, G as showModal, ae as translateMulti, aH as toButton, cW as getAuthentication, co as showActionSheet, bE as isOffline, b4 as isDateTimeField, eI as isAutocompleteLocalField, eJ as isNumberField, au as dispatchCustomEvent, y as isFirefox, eK as isForceScrollbar } from './index-421dbe45.js';
|
@@ -488,6 +488,12 @@ const YooGridComponent = class {
|
|
488
488
|
async updateValues(values, total, gridCurrentSearch) {
|
489
489
|
if (this.isFormField) {
|
490
490
|
this.items = [].concat(this.items || []).concat(values || []);
|
491
|
+
if ((values === null || values === void 0 ? void 0 : values.length) > 0 && isObject(values[0])) {
|
492
|
+
this.items = uniqBy(this.items, (d) => d[this.idAttributeName || '_id']);
|
493
|
+
}
|
494
|
+
else {
|
495
|
+
this.items = uniqBy(this.items, (d) => d);
|
496
|
+
}
|
491
497
|
}
|
492
498
|
else {
|
493
499
|
this.items = values;
|
@@ -5,7 +5,7 @@ import { g as getAppContext } from './common-helpers-5e93c41f.js';
|
|
5
5
|
import { s as setValueAndValidateInput } from './form-input-helpers-a8832c0e.js';
|
6
6
|
import { a as createCommonjsModule, c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-f4d11124.js';
|
7
7
|
import { a as isArray } from './lodash-04b11500.js';
|
8
|
-
import { X as isNativeFilePath, eE as getFileByPath, av as isFile, d3 as urlToFileBlob, l as isNativeMobile, eF as isBlob, A as saveToLocalFile,
|
8
|
+
import { X as isNativeFilePath, eE as getFileByPath, av as isFile, d3 as urlToFileBlob, l as isNativeMobile, eF as isBlob, A as saveToLocalFile, dZ as getMimeType, t as translate, H as isWeb } from './index-421dbe45.js';
|
9
9
|
|
10
10
|
var filepond = createCommonjsModule(function (module, exports) {
|
11
11
|
/*!
|
@@ -17145,7 +17145,7 @@ const YooFormUploaderComponent = class {
|
|
17145
17145
|
allowFileSizeValidation: true,
|
17146
17146
|
maxFileSize: this.maxFileSize,
|
17147
17147
|
maxTotalFileSize: null,
|
17148
|
-
allowMultiple: this.multiple
|
17148
|
+
allowMultiple: this.multiple,
|
17149
17149
|
className: this.cssClass ? this.cssClass : '',
|
17150
17150
|
acceptedFileTypes: this.extensions ? this.extensions.map((ext) => ((ext === null || ext === void 0 ? void 0 : ext.includes) && ext.includes('/') ? ext : getMimeType(ext))) : [],
|
17151
17151
|
fileValidateTypeDetectType: (source, type) => new Promise((resolve) => {
|
@@ -9,7 +9,7 @@ import { r as removeEntitiesWithIds } from './entities-helpers-5a6501ff.js';
|
|
9
9
|
import { m as mapCustomViewToButton, l as isKanbanColumnField } from './filters-helpers-3ab9ed00.js';
|
10
10
|
import { a as setValidator, s as setValueAndValidateInput } from './form-input-helpers-a8832c0e.js';
|
11
11
|
import { i as isEmail } from './text-helpers-a008b4db.js';
|
12
|
-
import { a0 as debounce, ad as throttle, i as isNil, f as isEqual, o as map, D as sortBy, a as isArray, B as isEmpty, ae as uniqWith, e as compact, E as get, r as isString, b as isNumber, I as isBoolean, V as findIndex, a7 as sum, S as range,
|
12
|
+
import { a0 as debounce, ad as throttle, i as isNil, f as isEqual, z as isObject, $ as uniqBy, o as map, D as sortBy, a as isArray, B as isEmpty, ae as uniqWith, e as compact, E as get, r as isString, b as isNumber, I as isBoolean, V as findIndex, a7 as sum, S as range, h as isFunction } from './lodash-04b11500.js';
|
13
13
|
import { S as Sortable } from './sortable.esm-f788d1ca.js';
|
14
14
|
import { b as getRenderer } from './grid-renderers-2eed8577.js';
|
15
15
|
import { l as isNativeMobile, eG as HorizontalSlidesAnimation, H as isWeb, r as pipes, e2 as safeScrollIntoView, V as getAsyncExtraData, bK as filterListByText, ag as getSession, d0 as isAnimationsDisabled, eH as isMapField, t as translate, G as showModal, ae as translateMulti, aH as toButton, cW as getAuthentication, co as showActionSheet, bE as isOffline, b4 as isDateTimeField, eI as isAutocompleteLocalField, eJ as isNumberField, au as dispatchCustomEvent, y as isFirefox, eK as isForceScrollbar } from './index-421dbe45.js';
|
@@ -488,6 +488,12 @@ const YooGridComponent = class {
|
|
488
488
|
async updateValues(values, total, gridCurrentSearch) {
|
489
489
|
if (this.isFormField) {
|
490
490
|
this.items = [].concat(this.items || []).concat(values || []);
|
491
|
+
if ((values === null || values === void 0 ? void 0 : values.length) > 0 && isObject(values[0])) {
|
492
|
+
this.items = uniqBy(this.items, (d) => d[this.idAttributeName || '_id']);
|
493
|
+
}
|
494
|
+
else {
|
495
|
+
this.items = uniqBy(this.items, (d) => d);
|
496
|
+
}
|
491
497
|
}
|
492
498
|
else {
|
493
499
|
this.items = values;
|