@knovator/pagecreator-admin 1.5.6 → 1.5.8
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/index.cjs +8 -7
- package/index.js +8 -7
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -4029,6 +4029,7 @@ const DNDItemsList = ({
|
|
|
4029
4029
|
onFilterClick,
|
|
4030
4030
|
disableSettings: _disableSettings = false
|
|
4031
4031
|
}) => {
|
|
4032
|
+
console.log('listCode: ', listCode);
|
|
4032
4033
|
console.log('items: ', items);
|
|
4033
4034
|
return /*#__PURE__*/React__default["default"].createElement(DragDropContextWrapper, {
|
|
4034
4035
|
onDragEnd: onDragEnd
|
|
@@ -7228,17 +7229,17 @@ const WidgetForm = ({
|
|
|
7228
7229
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7229
7230
|
callerRef.current = setTimeout(() => {
|
|
7230
7231
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7231
|
-
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7232
|
+
if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
|
|
7232
7233
|
value: item['_id'] || item['id'],
|
|
7233
|
-
label: item['name']
|
|
7234
|
-
}
|
|
7234
|
+
label: item['name'] || item['title']
|
|
7235
|
+
})));
|
|
7235
7236
|
if (formState === 'UPDATE') {
|
|
7236
7237
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7237
7238
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7238
|
-
return item ? Object.assign({
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
}
|
|
7239
|
+
return item ? Object.assign(Object.assign({}, item), {
|
|
7240
|
+
value: item._id || item.id,
|
|
7241
|
+
label: item.name || item.title
|
|
7242
|
+
}) : {};
|
|
7242
7243
|
})) || [];
|
|
7243
7244
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7244
7245
|
if (valueToSet) {
|
package/index.js
CHANGED
|
@@ -4017,6 +4017,7 @@ const DNDItemsList = ({
|
|
|
4017
4017
|
onFilterClick,
|
|
4018
4018
|
disableSettings: _disableSettings = false
|
|
4019
4019
|
}) => {
|
|
4020
|
+
console.log('listCode: ', listCode);
|
|
4020
4021
|
console.log('items: ', items);
|
|
4021
4022
|
return /*#__PURE__*/React.createElement(DragDropContextWrapper, {
|
|
4022
4023
|
onDragEnd: onDragEnd
|
|
@@ -7216,17 +7217,17 @@ const WidgetForm = ({
|
|
|
7216
7217
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7217
7218
|
callerRef.current = setTimeout(() => {
|
|
7218
7219
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7219
|
-
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7220
|
+
if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
|
|
7220
7221
|
value: item['_id'] || item['id'],
|
|
7221
|
-
label: item['name']
|
|
7222
|
-
}
|
|
7222
|
+
label: item['name'] || item['title']
|
|
7223
|
+
})));
|
|
7223
7224
|
if (formState === 'UPDATE') {
|
|
7224
7225
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7225
7226
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7226
|
-
return item ? Object.assign({
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
}
|
|
7227
|
+
return item ? Object.assign(Object.assign({}, item), {
|
|
7228
|
+
value: item._id || item.id,
|
|
7229
|
+
label: item.name || item.title
|
|
7230
|
+
}) : {};
|
|
7230
7231
|
})) || [];
|
|
7231
7232
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7232
7233
|
if (valueToSet) {
|