@knovator/pagecreator-admin 1.5.5 → 1.5.6
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 +2 -5
- package/index.js +2 -5
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -3461,7 +3461,7 @@ const CustomReactSelect = ({
|
|
|
3461
3461
|
isLoading: isLoading,
|
|
3462
3462
|
loadOptions: loadOptions,
|
|
3463
3463
|
placeholder: placeholder,
|
|
3464
|
-
formatOptionLabel: formatOptionLabel && listCode !== 'pages' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3464
|
+
formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blogs' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3465
3465
|
styles: customStyles
|
|
3466
3466
|
}), error && /*#__PURE__*/React__default["default"].createElement("p", {
|
|
3467
3467
|
className: "khb_input-error "
|
|
@@ -4045,7 +4045,7 @@ const DNDItemsList = ({
|
|
|
4045
4045
|
className: "khb_DND-item",
|
|
4046
4046
|
key: item.value,
|
|
4047
4047
|
ref: provided.innerRef
|
|
4048
|
-
}, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' ? formatItem(listCode, item) : (/*#__PURE__*/React__default["default"].createElement("div", {
|
|
4048
|
+
}, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blogs' ? formatItem(listCode, item) : (/*#__PURE__*/React__default["default"].createElement("div", {
|
|
4049
4049
|
className: "khb_DND-item-content"
|
|
4050
4050
|
}, /*#__PURE__*/React__default["default"].createElement("p", {
|
|
4051
4051
|
className: "khb_DND-item-text"
|
|
@@ -7228,13 +7228,11 @@ const WidgetForm = ({
|
|
|
7228
7228
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7229
7229
|
callerRef.current = setTimeout(() => {
|
|
7230
7230
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7231
|
-
console.log('API options:', options); // Debug: see what comes from backend
|
|
7232
7231
|
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7233
7232
|
value: item['_id'] || item['id'],
|
|
7234
7233
|
label: item['name']
|
|
7235
7234
|
}, item)));
|
|
7236
7235
|
if (formState === 'UPDATE') {
|
|
7237
|
-
console.log('collectionItems (stored IDs):', collectionItems); // Debug
|
|
7238
7236
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7239
7237
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7240
7238
|
return item ? Object.assign({
|
|
@@ -7243,7 +7241,6 @@ const WidgetForm = ({
|
|
|
7243
7241
|
}, item) : {};
|
|
7244
7242
|
})) || [];
|
|
7245
7243
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7246
|
-
console.log('selectedOptions (after mapping):', selectedOptions); // Debug
|
|
7247
7244
|
if (valueToSet) {
|
|
7248
7245
|
// only set tabcollection items, when they are not set
|
|
7249
7246
|
if (!tabCollectionItemsUpdated[activeTab]) {
|
package/index.js
CHANGED
|
@@ -3449,7 +3449,7 @@ const CustomReactSelect = ({
|
|
|
3449
3449
|
isLoading: isLoading,
|
|
3450
3450
|
loadOptions: loadOptions,
|
|
3451
3451
|
placeholder: placeholder,
|
|
3452
|
-
formatOptionLabel: formatOptionLabel && listCode !== 'pages' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3452
|
+
formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blogs' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
3453
3453
|
styles: customStyles
|
|
3454
3454
|
}), error && /*#__PURE__*/React.createElement("p", {
|
|
3455
3455
|
className: "khb_input-error "
|
|
@@ -4033,7 +4033,7 @@ const DNDItemsList = ({
|
|
|
4033
4033
|
className: "khb_DND-item",
|
|
4034
4034
|
key: item.value,
|
|
4035
4035
|
ref: provided.innerRef
|
|
4036
|
-
}, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' ? formatItem(listCode, item) : (/*#__PURE__*/React.createElement("div", {
|
|
4036
|
+
}, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blogs' ? formatItem(listCode, item) : (/*#__PURE__*/React.createElement("div", {
|
|
4037
4037
|
className: "khb_DND-item-content"
|
|
4038
4038
|
}, /*#__PURE__*/React.createElement("p", {
|
|
4039
4039
|
className: "khb_DND-item-text"
|
|
@@ -7216,13 +7216,11 @@ const WidgetForm = ({
|
|
|
7216
7216
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7217
7217
|
callerRef.current = setTimeout(() => {
|
|
7218
7218
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7219
|
-
console.log('API options:', options); // Debug: see what comes from backend
|
|
7220
7219
|
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7221
7220
|
value: item['_id'] || item['id'],
|
|
7222
7221
|
label: item['name']
|
|
7223
7222
|
}, item)));
|
|
7224
7223
|
if (formState === 'UPDATE') {
|
|
7225
|
-
console.log('collectionItems (stored IDs):', collectionItems); // Debug
|
|
7226
7224
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7227
7225
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7228
7226
|
return item ? Object.assign({
|
|
@@ -7231,7 +7229,6 @@ const WidgetForm = ({
|
|
|
7231
7229
|
}, item) : {};
|
|
7232
7230
|
})) || [];
|
|
7233
7231
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7234
|
-
console.log('selectedOptions (after mapping):', selectedOptions); // Debug
|
|
7235
7232
|
if (valueToSet) {
|
|
7236
7233
|
// only set tabcollection items, when they are not set
|
|
7237
7234
|
if (!tabCollectionItemsUpdated[activeTab]) {
|