@knovator/pagecreator-admin 1.6.4 → 1.6.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 +100 -52
- package/index.js +100 -52
- package/package.json +1 -1
- package/src/lib/components/common/Input/ReactSelect.d.ts +1 -1
package/index.cjs
CHANGED
|
@@ -3445,7 +3445,8 @@ const CustomReactSelect = ({
|
|
|
3445
3445
|
formatOptionLabel,
|
|
3446
3446
|
listCode,
|
|
3447
3447
|
customStyles,
|
|
3448
|
-
selectKey
|
|
3448
|
+
selectKey,
|
|
3449
|
+
disabled
|
|
3449
3450
|
}) => {
|
|
3450
3451
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3451
3452
|
className: wrapperClassName
|
|
@@ -3466,6 +3467,7 @@ const CustomReactSelect = ({
|
|
|
3466
3467
|
defaultOptions: true,
|
|
3467
3468
|
isSearchable: isSearchable,
|
|
3468
3469
|
isLoading: isLoading,
|
|
3470
|
+
isDisabled: disabled,
|
|
3469
3471
|
loadOptions: loadOptions,
|
|
3470
3472
|
placeholder: placeholder,
|
|
3471
3473
|
formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blog' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
@@ -3819,7 +3821,7 @@ const SimpleForm = /*#__PURE__*/React.forwardRef(({
|
|
|
3819
3821
|
switch (schema.type) {
|
|
3820
3822
|
case 'ReactSelect':
|
|
3821
3823
|
input = /*#__PURE__*/React__default["default"].createElement(CustomReactSelect, {
|
|
3822
|
-
disabled: !_enable,
|
|
3824
|
+
disabled: _isUpdating && typeof schema.editable !== 'undefined' && !schema.editable || !_enable || schema.disabled,
|
|
3823
3825
|
label: schema.label,
|
|
3824
3826
|
error: (_b = (_a = errors[schema.accessor]) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.toString(),
|
|
3825
3827
|
onChange: value => {
|
|
@@ -7259,47 +7261,70 @@ const WidgetForm = ({
|
|
|
7259
7261
|
fetchBlogCategories();
|
|
7260
7262
|
}
|
|
7261
7263
|
}, [currentItemsType, baseUrl, token, widgetRoutesPrefix, blogCategories.length]);
|
|
7264
|
+
// Set blog category and limit when editing a widget
|
|
7265
|
+
React.useEffect(() => {
|
|
7266
|
+
if (formState === 'UPDATE' && data && currentItemsType === 'blog' && blogCategories.length > 0) {
|
|
7267
|
+
// Set blog category if it exists in the data
|
|
7268
|
+
if (data.blogCategory && !blogCategory) {
|
|
7269
|
+
const savedCategory = blogCategories.find(cat => cat.value === data.blogCategory);
|
|
7270
|
+
if (savedCategory) {
|
|
7271
|
+
setBlogCategory(savedCategory);
|
|
7272
|
+
}
|
|
7273
|
+
}
|
|
7274
|
+
// Set blog limit if it exists in the data
|
|
7275
|
+
if (data.blogLimit && blogLimit === 10) {
|
|
7276
|
+
setBlogLimit(data.blogLimit);
|
|
7277
|
+
}
|
|
7278
|
+
}
|
|
7279
|
+
}, [formState, data, currentItemsType, blogCategories, blogCategory, blogLimit]);
|
|
7262
7280
|
// Auto-fetch blogs when category or limit changes
|
|
7263
7281
|
React.useEffect(() => {
|
|
7264
|
-
if (currentItemsType === 'blog'
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7282
|
+
if (currentItemsType === 'blog') {
|
|
7283
|
+
if (blogCategory && blogLimit > 0) {
|
|
7284
|
+
// Fetch blogs when category is selected
|
|
7285
|
+
const fetchBlogsByCategory = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7286
|
+
var _a;
|
|
7287
|
+
try {
|
|
7288
|
+
setCollectionItemsUpdated(false);
|
|
7289
|
+
const response = yield commonApi({
|
|
7290
|
+
baseUrl,
|
|
7291
|
+
token,
|
|
7292
|
+
method: 'POST',
|
|
7293
|
+
url: `${widgetRoutesPrefix}/collection-data`,
|
|
7294
|
+
data: {
|
|
7295
|
+
search: '',
|
|
7296
|
+
collectionName: 'blog',
|
|
7297
|
+
collectionItems: []
|
|
7298
|
+
},
|
|
7299
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7300
|
+
onError: error => console.error('Error fetching blogs:', error)
|
|
7301
|
+
});
|
|
7302
|
+
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS' && Array.isArray((_a = response.data) === null || _a === void 0 ? void 0 : _a.docs)) {
|
|
7303
|
+
// Filter blogs by selected category
|
|
7304
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7305
|
+
const filteredBlogs = response.data.docs
|
|
7306
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7307
|
+
.filter(blog => Array.isArray(blog.category) &&
|
|
7308
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7309
|
+
blog.category.some(cat => cat.id === blogCategory.value)).slice(0, blogLimit)
|
|
7310
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7311
|
+
.map(blog => Object.assign(Object.assign({}, blog), {
|
|
7312
|
+
value: blog._id,
|
|
7313
|
+
label: blog.name || blog.title
|
|
7314
|
+
}));
|
|
7315
|
+
setSelectedCollectionItems(filteredBlogs);
|
|
7316
|
+
setCollectionItemsUpdated(true);
|
|
7317
|
+
}
|
|
7318
|
+
} catch (error) {
|
|
7319
|
+
console.error('Error fetching blogs:', error);
|
|
7297
7320
|
}
|
|
7298
|
-
}
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7321
|
+
});
|
|
7322
|
+
fetchBlogsByCategory();
|
|
7323
|
+
} else if (!blogCategory) {
|
|
7324
|
+
// Clear selected blogs when category is cleared
|
|
7325
|
+
setSelectedCollectionItems([]);
|
|
7326
|
+
setCollectionItemsUpdated(true);
|
|
7327
|
+
}
|
|
7303
7328
|
}
|
|
7304
7329
|
}, [blogCategory, blogLimit, currentItemsType, baseUrl, token, widgetRoutesPrefix]);
|
|
7305
7330
|
// Reset blog category and limit when itemsType changes away from 'blogs'
|
|
@@ -7310,6 +7335,14 @@ const WidgetForm = ({
|
|
|
7310
7335
|
setBlogCategories([]);
|
|
7311
7336
|
}
|
|
7312
7337
|
}, [currentItemsType]);
|
|
7338
|
+
// Watch blogLimit form value and update state
|
|
7339
|
+
const watchedBlogLimit = watch('blogLimit');
|
|
7340
|
+
React.useEffect(() => {
|
|
7341
|
+
if (watchedBlogLimit && currentItemsType === 'blog') {
|
|
7342
|
+
const limit = parseInt(watchedBlogLimit) || 10;
|
|
7343
|
+
setBlogLimit(limit);
|
|
7344
|
+
}
|
|
7345
|
+
}, [watchedBlogLimit, currentItemsType]);
|
|
7313
7346
|
const onChangeSearch = (str, callback, collectionName) => {
|
|
7314
7347
|
let collectionItems = [];
|
|
7315
7348
|
let valueToSet = '';
|
|
@@ -7655,22 +7688,36 @@ const WidgetForm = ({
|
|
|
7655
7688
|
customStyles: reactSelectStyles || {},
|
|
7656
7689
|
selectKey: `blog-category-select-${blogCategories.length}`
|
|
7657
7690
|
}, {
|
|
7658
|
-
label: '
|
|
7691
|
+
label: 'No. of Blogs',
|
|
7659
7692
|
accessor: 'blogLimit',
|
|
7660
|
-
type: '
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7693
|
+
type: 'select',
|
|
7694
|
+
options: [{
|
|
7695
|
+
value: '',
|
|
7696
|
+
label: 'Select number of blogs'
|
|
7697
|
+
}, {
|
|
7698
|
+
value: '1',
|
|
7699
|
+
label: '1'
|
|
7700
|
+
}, {
|
|
7701
|
+
value: '2',
|
|
7702
|
+
label: '2'
|
|
7703
|
+
}, {
|
|
7704
|
+
value: '3',
|
|
7705
|
+
label: '3'
|
|
7706
|
+
}, {
|
|
7707
|
+
value: '4',
|
|
7708
|
+
label: '4'
|
|
7709
|
+
}, {
|
|
7710
|
+
value: '5',
|
|
7711
|
+
label: '5'
|
|
7712
|
+
}, {
|
|
7713
|
+
value: '6',
|
|
7714
|
+
label: '6'
|
|
7715
|
+
}],
|
|
7666
7716
|
show: currentItemsType === 'blog' && !itemsEnabled && ((selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.carouselWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.fixedCardWidgetTypeValue || !selectedWidgetType) && !!(selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value),
|
|
7667
|
-
placeholder: 'Enter maximum number of blogs',
|
|
7668
7717
|
wrapperClassName: 'khb_grid-item-1of2 khb_padding-left-1',
|
|
7718
|
+
required: true,
|
|
7669
7719
|
validations: {
|
|
7670
|
-
|
|
7671
|
-
value: 1,
|
|
7672
|
-
message: 'Minimum limit is 1'
|
|
7673
|
-
}
|
|
7720
|
+
required: 'Number of blogs is required'
|
|
7674
7721
|
}
|
|
7675
7722
|
}, {
|
|
7676
7723
|
label: widgetTranslations.webPerRow,
|
|
@@ -7729,6 +7776,7 @@ const WidgetForm = ({
|
|
|
7729
7776
|
onChange: setSelectedCollectionItems,
|
|
7730
7777
|
loadOptions: onChangeSearch,
|
|
7731
7778
|
isLoading: collectionDataLoading,
|
|
7779
|
+
disabled: currentItemsType === 'blog' && !!blogCategory,
|
|
7732
7780
|
show: !itemsEnabled && ((selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.carouselWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.fixedCardWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.linksWidgetTypeValue || !selectedWidgetType) && !!(selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value),
|
|
7733
7781
|
formatOptionLabel: formatOptionLabel,
|
|
7734
7782
|
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
package/index.js
CHANGED
|
@@ -3433,7 +3433,8 @@ const CustomReactSelect = ({
|
|
|
3433
3433
|
formatOptionLabel,
|
|
3434
3434
|
listCode,
|
|
3435
3435
|
customStyles,
|
|
3436
|
-
selectKey
|
|
3436
|
+
selectKey,
|
|
3437
|
+
disabled
|
|
3437
3438
|
}) => {
|
|
3438
3439
|
return /*#__PURE__*/React.createElement("div", {
|
|
3439
3440
|
className: wrapperClassName
|
|
@@ -3454,6 +3455,7 @@ const CustomReactSelect = ({
|
|
|
3454
3455
|
defaultOptions: true,
|
|
3455
3456
|
isSearchable: isSearchable,
|
|
3456
3457
|
isLoading: isLoading,
|
|
3458
|
+
isDisabled: disabled,
|
|
3457
3459
|
loadOptions: loadOptions,
|
|
3458
3460
|
placeholder: placeholder,
|
|
3459
3461
|
formatOptionLabel: formatOptionLabel && listCode !== 'pages' && listCode !== 'blog' ? option => formatOptionLabel(listCode, option) : undefined,
|
|
@@ -3807,7 +3809,7 @@ const SimpleForm = /*#__PURE__*/forwardRef(({
|
|
|
3807
3809
|
switch (schema.type) {
|
|
3808
3810
|
case 'ReactSelect':
|
|
3809
3811
|
input = /*#__PURE__*/React.createElement(CustomReactSelect, {
|
|
3810
|
-
disabled: !_enable,
|
|
3812
|
+
disabled: _isUpdating && typeof schema.editable !== 'undefined' && !schema.editable || !_enable || schema.disabled,
|
|
3811
3813
|
label: schema.label,
|
|
3812
3814
|
error: (_b = (_a = errors[schema.accessor]) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.toString(),
|
|
3813
3815
|
onChange: value => {
|
|
@@ -7247,47 +7249,70 @@ const WidgetForm = ({
|
|
|
7247
7249
|
fetchBlogCategories();
|
|
7248
7250
|
}
|
|
7249
7251
|
}, [currentItemsType, baseUrl, token, widgetRoutesPrefix, blogCategories.length]);
|
|
7252
|
+
// Set blog category and limit when editing a widget
|
|
7253
|
+
useEffect(() => {
|
|
7254
|
+
if (formState === 'UPDATE' && data && currentItemsType === 'blog' && blogCategories.length > 0) {
|
|
7255
|
+
// Set blog category if it exists in the data
|
|
7256
|
+
if (data.blogCategory && !blogCategory) {
|
|
7257
|
+
const savedCategory = blogCategories.find(cat => cat.value === data.blogCategory);
|
|
7258
|
+
if (savedCategory) {
|
|
7259
|
+
setBlogCategory(savedCategory);
|
|
7260
|
+
}
|
|
7261
|
+
}
|
|
7262
|
+
// Set blog limit if it exists in the data
|
|
7263
|
+
if (data.blogLimit && blogLimit === 10) {
|
|
7264
|
+
setBlogLimit(data.blogLimit);
|
|
7265
|
+
}
|
|
7266
|
+
}
|
|
7267
|
+
}, [formState, data, currentItemsType, blogCategories, blogCategory, blogLimit]);
|
|
7250
7268
|
// Auto-fetch blogs when category or limit changes
|
|
7251
7269
|
useEffect(() => {
|
|
7252
|
-
if (currentItemsType === 'blog'
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7270
|
+
if (currentItemsType === 'blog') {
|
|
7271
|
+
if (blogCategory && blogLimit > 0) {
|
|
7272
|
+
// Fetch blogs when category is selected
|
|
7273
|
+
const fetchBlogsByCategory = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
7274
|
+
var _a;
|
|
7275
|
+
try {
|
|
7276
|
+
setCollectionItemsUpdated(false);
|
|
7277
|
+
const response = yield commonApi({
|
|
7278
|
+
baseUrl,
|
|
7279
|
+
token,
|
|
7280
|
+
method: 'POST',
|
|
7281
|
+
url: `${widgetRoutesPrefix}/collection-data`,
|
|
7282
|
+
data: {
|
|
7283
|
+
search: '',
|
|
7284
|
+
collectionName: 'blog',
|
|
7285
|
+
collectionItems: []
|
|
7286
|
+
},
|
|
7287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7288
|
+
onError: error => console.error('Error fetching blogs:', error)
|
|
7289
|
+
});
|
|
7290
|
+
if ((response === null || response === void 0 ? void 0 : response.code) === 'SUCCESS' && Array.isArray((_a = response.data) === null || _a === void 0 ? void 0 : _a.docs)) {
|
|
7291
|
+
// Filter blogs by selected category
|
|
7292
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7293
|
+
const filteredBlogs = response.data.docs
|
|
7294
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7295
|
+
.filter(blog => Array.isArray(blog.category) &&
|
|
7296
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7297
|
+
blog.category.some(cat => cat.id === blogCategory.value)).slice(0, blogLimit)
|
|
7298
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7299
|
+
.map(blog => Object.assign(Object.assign({}, blog), {
|
|
7300
|
+
value: blog._id,
|
|
7301
|
+
label: blog.name || blog.title
|
|
7302
|
+
}));
|
|
7303
|
+
setSelectedCollectionItems(filteredBlogs);
|
|
7304
|
+
setCollectionItemsUpdated(true);
|
|
7305
|
+
}
|
|
7306
|
+
} catch (error) {
|
|
7307
|
+
console.error('Error fetching blogs:', error);
|
|
7285
7308
|
}
|
|
7286
|
-
}
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7309
|
+
});
|
|
7310
|
+
fetchBlogsByCategory();
|
|
7311
|
+
} else if (!blogCategory) {
|
|
7312
|
+
// Clear selected blogs when category is cleared
|
|
7313
|
+
setSelectedCollectionItems([]);
|
|
7314
|
+
setCollectionItemsUpdated(true);
|
|
7315
|
+
}
|
|
7291
7316
|
}
|
|
7292
7317
|
}, [blogCategory, blogLimit, currentItemsType, baseUrl, token, widgetRoutesPrefix]);
|
|
7293
7318
|
// Reset blog category and limit when itemsType changes away from 'blogs'
|
|
@@ -7298,6 +7323,14 @@ const WidgetForm = ({
|
|
|
7298
7323
|
setBlogCategories([]);
|
|
7299
7324
|
}
|
|
7300
7325
|
}, [currentItemsType]);
|
|
7326
|
+
// Watch blogLimit form value and update state
|
|
7327
|
+
const watchedBlogLimit = watch('blogLimit');
|
|
7328
|
+
useEffect(() => {
|
|
7329
|
+
if (watchedBlogLimit && currentItemsType === 'blog') {
|
|
7330
|
+
const limit = parseInt(watchedBlogLimit) || 10;
|
|
7331
|
+
setBlogLimit(limit);
|
|
7332
|
+
}
|
|
7333
|
+
}, [watchedBlogLimit, currentItemsType]);
|
|
7301
7334
|
const onChangeSearch = (str, callback, collectionName) => {
|
|
7302
7335
|
let collectionItems = [];
|
|
7303
7336
|
let valueToSet = '';
|
|
@@ -7643,22 +7676,36 @@ const WidgetForm = ({
|
|
|
7643
7676
|
customStyles: reactSelectStyles || {},
|
|
7644
7677
|
selectKey: `blog-category-select-${blogCategories.length}`
|
|
7645
7678
|
}, {
|
|
7646
|
-
label: '
|
|
7679
|
+
label: 'No. of Blogs',
|
|
7647
7680
|
accessor: 'blogLimit',
|
|
7648
|
-
type: '
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7681
|
+
type: 'select',
|
|
7682
|
+
options: [{
|
|
7683
|
+
value: '',
|
|
7684
|
+
label: 'Select number of blogs'
|
|
7685
|
+
}, {
|
|
7686
|
+
value: '1',
|
|
7687
|
+
label: '1'
|
|
7688
|
+
}, {
|
|
7689
|
+
value: '2',
|
|
7690
|
+
label: '2'
|
|
7691
|
+
}, {
|
|
7692
|
+
value: '3',
|
|
7693
|
+
label: '3'
|
|
7694
|
+
}, {
|
|
7695
|
+
value: '4',
|
|
7696
|
+
label: '4'
|
|
7697
|
+
}, {
|
|
7698
|
+
value: '5',
|
|
7699
|
+
label: '5'
|
|
7700
|
+
}, {
|
|
7701
|
+
value: '6',
|
|
7702
|
+
label: '6'
|
|
7703
|
+
}],
|
|
7654
7704
|
show: currentItemsType === 'blog' && !itemsEnabled && ((selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.carouselWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.fixedCardWidgetTypeValue || !selectedWidgetType) && !!(selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value),
|
|
7655
|
-
placeholder: 'Enter maximum number of blogs',
|
|
7656
7705
|
wrapperClassName: 'khb_grid-item-1of2 khb_padding-left-1',
|
|
7706
|
+
required: true,
|
|
7657
7707
|
validations: {
|
|
7658
|
-
|
|
7659
|
-
value: 1,
|
|
7660
|
-
message: 'Minimum limit is 1'
|
|
7661
|
-
}
|
|
7708
|
+
required: 'Number of blogs is required'
|
|
7662
7709
|
}
|
|
7663
7710
|
}, {
|
|
7664
7711
|
label: widgetTranslations.webPerRow,
|
|
@@ -7717,6 +7764,7 @@ const WidgetForm = ({
|
|
|
7717
7764
|
onChange: setSelectedCollectionItems,
|
|
7718
7765
|
loadOptions: onChangeSearch,
|
|
7719
7766
|
isLoading: collectionDataLoading,
|
|
7767
|
+
disabled: currentItemsType === 'blog' && !!blogCategory,
|
|
7720
7768
|
show: !itemsEnabled && ((selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.carouselWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.fixedCardWidgetTypeValue || (selectedWidgetType === null || selectedWidgetType === void 0 ? void 0 : selectedWidgetType.value) === constants.linksWidgetTypeValue || !selectedWidgetType) && !!(selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value),
|
|
7721
7769
|
formatOptionLabel: formatOptionLabel,
|
|
7722
7770
|
listCode: selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value,
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ReactSelectProps } from '../../../types';
|
|
3
|
-
declare const CustomReactSelect: ({ onChange, label, error, className, isMulti, selectedOptions, required, isLoading, isSearchable, isClearable, loadOptions, placeholder, wrapperClassName, formatOptionLabel, listCode, customStyles, selectKey, }: ReactSelectProps) => JSX.Element;
|
|
3
|
+
declare const CustomReactSelect: ({ onChange, label, error, className, isMulti, selectedOptions, required, isLoading, isSearchable, isClearable, loadOptions, placeholder, wrapperClassName, formatOptionLabel, listCode, customStyles, selectKey, disabled, }: ReactSelectProps) => JSX.Element;
|
|
4
4
|
export default CustomReactSelect;
|