@knovator/pagecreator-admin 1.5.8 → 1.6.0
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 +11 -8
- package/index.js +11 -8
- 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 !== '
|
|
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 !== '
|
|
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"
|
|
@@ -7146,7 +7146,10 @@ const WidgetForm = ({
|
|
|
7146
7146
|
setError,
|
|
7147
7147
|
getValues
|
|
7148
7148
|
} = reactHookForm.useForm({
|
|
7149
|
-
shouldUnregister: false
|
|
7149
|
+
shouldUnregister: false,
|
|
7150
|
+
defaultValues: {
|
|
7151
|
+
backgroundColor: '#ffffff'
|
|
7152
|
+
}
|
|
7150
7153
|
});
|
|
7151
7154
|
const {
|
|
7152
7155
|
switchClass,
|
|
@@ -7529,11 +7532,6 @@ const WidgetForm = ({
|
|
|
7529
7532
|
required: widgetTranslations.itemsTypePlaceholder
|
|
7530
7533
|
},
|
|
7531
7534
|
options: (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.linksWidgetTypeValue ? itemsTypes.filter(item => item.value === constants.pagesItemsTypeValue) : (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.tabsWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.collectionsOnly) ? itemsTypes.filter(item => item.label !== constants.imageItemsTypeValue && item.value !== constants.pagesItemsTypeValue) : (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.imageOnly) ? itemsTypes.filter(item => item.label === constants.imageItemsTypeValue) : itemsTypes.filter(item => item.value !== constants.pagesItemsTypeValue)
|
|
7532
|
-
}, {
|
|
7533
|
-
label: widgetTranslations.color,
|
|
7534
|
-
accessor: 'backgroundColor',
|
|
7535
|
-
type: 'color',
|
|
7536
|
-
className: 'khb_input-color'
|
|
7537
7535
|
}, {
|
|
7538
7536
|
label: widgetTranslations.webPerRow,
|
|
7539
7537
|
accessor: 'webPerRow',
|
|
@@ -7596,6 +7594,11 @@ const WidgetForm = ({
|
|
|
7596
7594
|
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
|
7597
7595
|
customStyles: reactSelectStyles || {},
|
|
7598
7596
|
selectKey: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value
|
|
7597
|
+
}, {
|
|
7598
|
+
label: widgetTranslations.color,
|
|
7599
|
+
accessor: 'backgroundColor',
|
|
7600
|
+
type: 'color',
|
|
7601
|
+
className: 'khb_input-color'
|
|
7599
7602
|
}];
|
|
7600
7603
|
if (!canAdd || !canUpdate) return null;
|
|
7601
7604
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
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 !== '
|
|
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 !== '
|
|
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"
|
|
@@ -7134,7 +7134,10 @@ const WidgetForm = ({
|
|
|
7134
7134
|
setError,
|
|
7135
7135
|
getValues
|
|
7136
7136
|
} = useForm({
|
|
7137
|
-
shouldUnregister: false
|
|
7137
|
+
shouldUnregister: false,
|
|
7138
|
+
defaultValues: {
|
|
7139
|
+
backgroundColor: '#ffffff'
|
|
7140
|
+
}
|
|
7138
7141
|
});
|
|
7139
7142
|
const {
|
|
7140
7143
|
switchClass,
|
|
@@ -7517,11 +7520,6 @@ const WidgetForm = ({
|
|
|
7517
7520
|
required: widgetTranslations.itemsTypePlaceholder
|
|
7518
7521
|
},
|
|
7519
7522
|
options: (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.linksWidgetTypeValue ? itemsTypes.filter(item => item.value === constants.pagesItemsTypeValue) : (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.tabsWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.collectionsOnly) ? itemsTypes.filter(item => item.label !== constants.imageItemsTypeValue && item.value !== constants.pagesItemsTypeValue) : (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.imageOnly) ? itemsTypes.filter(item => item.label === constants.imageItemsTypeValue) : itemsTypes.filter(item => item.value !== constants.pagesItemsTypeValue)
|
|
7520
|
-
}, {
|
|
7521
|
-
label: widgetTranslations.color,
|
|
7522
|
-
accessor: 'backgroundColor',
|
|
7523
|
-
type: 'color',
|
|
7524
|
-
className: 'khb_input-color'
|
|
7525
7523
|
}, {
|
|
7526
7524
|
label: widgetTranslations.webPerRow,
|
|
7527
7525
|
accessor: 'webPerRow',
|
|
@@ -7584,6 +7582,11 @@ const WidgetForm = ({
|
|
|
7584
7582
|
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
|
7585
7583
|
customStyles: reactSelectStyles || {},
|
|
7586
7584
|
selectKey: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value
|
|
7585
|
+
}, {
|
|
7586
|
+
label: widgetTranslations.color,
|
|
7587
|
+
accessor: 'backgroundColor',
|
|
7588
|
+
type: 'color',
|
|
7589
|
+
className: 'khb_input-color'
|
|
7587
7590
|
}];
|
|
7588
7591
|
if (!canAdd || !canUpdate) return null;
|
|
7589
7592
|
return /*#__PURE__*/React.createElement("div", {
|