@knovator/pagecreator-admin 1.5.7 → 1.5.9

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.
Files changed (3) hide show
  1. package/index.cjs +8 -8
  2. package/index.js +8 -8
  3. 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' && listCode !== 'blogs' ? option => formatOptionLabel(listCode, option) : undefined,
3464
+ formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blog' ? option => formatOptionLabel(listCode, option) : undefined,
3465
3465
  styles: customStyles
3466
3466
  }), error && /*#__PURE__*/React__default["default"].createElement("p", {
3467
3467
  className: "khb_input-error "
@@ -4046,7 +4046,7 @@ const DNDItemsList = ({
4046
4046
  className: "khb_DND-item",
4047
4047
  key: item.value,
4048
4048
  ref: provided.innerRef
4049
- }, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blogs' ? formatItem(listCode, item) : (/*#__PURE__*/React__default["default"].createElement("div", {
4049
+ }, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blog' ? formatItem(listCode, item) : (/*#__PURE__*/React__default["default"].createElement("div", {
4050
4050
  className: "khb_DND-item-content"
4051
4051
  }, /*#__PURE__*/React__default["default"].createElement("p", {
4052
4052
  className: "khb_DND-item-text"
@@ -7229,17 +7229,17 @@ const WidgetForm = ({
7229
7229
  const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
7230
7230
  callerRef.current = setTimeout(() => {
7231
7231
  if (collectionToUse) getCollectionData(collectionToUse, str, options => {
7232
- if (typeof callback === 'function') callback(options.map(item => Object.assign({
7232
+ if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
7233
7233
  value: item['_id'] || item['id'],
7234
7234
  label: item['name'] || item['title']
7235
- }, item)));
7235
+ })));
7236
7236
  if (formState === 'UPDATE') {
7237
7237
  let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
7238
7238
  item = options.find(item => item._id === itemId || item.id === itemId);
7239
- return item ? Object.assign({
7240
- label: item.name || item.title,
7241
- value: item._id || item.id
7242
- }, item) : {};
7239
+ return item ? Object.assign(Object.assign({}, item), {
7240
+ value: item._id || item.id,
7241
+ label: item.name || item.title
7242
+ }) : {};
7243
7243
  })) || [];
7244
7244
  selectedOptions = selectedOptions.filter(obj => !!obj.value);
7245
7245
  if (valueToSet) {
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' && listCode !== 'blogs' ? option => formatOptionLabel(listCode, option) : undefined,
3452
+ formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blog' ? option => formatOptionLabel(listCode, option) : undefined,
3453
3453
  styles: customStyles
3454
3454
  }), error && /*#__PURE__*/React.createElement("p", {
3455
3455
  className: "khb_input-error "
@@ -4034,7 +4034,7 @@ const DNDItemsList = ({
4034
4034
  className: "khb_DND-item",
4035
4035
  key: item.value,
4036
4036
  ref: provided.innerRef
4037
- }, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blogs' ? formatItem(listCode, item) : (/*#__PURE__*/React.createElement("div", {
4037
+ }, provided.draggableProps, provided.dragHandleProps), typeof formatItem === 'function' && listCode && listCode !== 'pages' && listCode !== 'blog' ? formatItem(listCode, item) : (/*#__PURE__*/React.createElement("div", {
4038
4038
  className: "khb_DND-item-content"
4039
4039
  }, /*#__PURE__*/React.createElement("p", {
4040
4040
  className: "khb_DND-item-text"
@@ -7217,17 +7217,17 @@ const WidgetForm = ({
7217
7217
  const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
7218
7218
  callerRef.current = setTimeout(() => {
7219
7219
  if (collectionToUse) getCollectionData(collectionToUse, str, options => {
7220
- if (typeof callback === 'function') callback(options.map(item => Object.assign({
7220
+ if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
7221
7221
  value: item['_id'] || item['id'],
7222
7222
  label: item['name'] || item['title']
7223
- }, item)));
7223
+ })));
7224
7224
  if (formState === 'UPDATE') {
7225
7225
  let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
7226
7226
  item = options.find(item => item._id === itemId || item.id === itemId);
7227
- return item ? Object.assign({
7228
- label: item.name || item.title,
7229
- value: item._id || item.id
7230
- }, item) : {};
7227
+ return item ? Object.assign(Object.assign({}, item), {
7228
+ value: item._id || item.id,
7229
+ label: item.name || item.title
7230
+ }) : {};
7231
7231
  })) || [];
7232
7232
  selectedOptions = selectedOptions.filter(obj => !!obj.value);
7233
7233
  if (valueToSet) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knovator/pagecreator-admin",
3
- "version": "1.5.7",
3
+ "version": "1.5.9",
4
4
  "dependencies": {
5
5
  "classnames": "^2.3.1",
6
6
  "react-beautiful-dnd": "^13.1.0",