@knovator/pagecreator-admin 1.6.2 → 1.6.3

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 +6 -6
  2. package/index.js +6 -6
  3. package/package.json +1 -1
package/index.cjs CHANGED
@@ -7228,7 +7228,7 @@ const WidgetForm = ({
7228
7228
  const currentItemsType = watch(constants.itemTypeAccessor);
7229
7229
  // Fetch blog categories when itemsType is 'blogs'
7230
7230
  React.useEffect(() => {
7231
- if (currentItemsType === 'blogs' && blogCategories.length === 0) {
7231
+ if (currentItemsType === 'blog' && blogCategories.length === 0) {
7232
7232
  const fetchBlogCategories = () => __awaiter(void 0, void 0, void 0, function* () {
7233
7233
  var _a;
7234
7234
  try {
@@ -7261,7 +7261,7 @@ const WidgetForm = ({
7261
7261
  }, [currentItemsType, baseUrl, token, widgetRoutesPrefix, blogCategories.length]);
7262
7262
  // Auto-fetch blogs when category or limit changes
7263
7263
  React.useEffect(() => {
7264
- if (currentItemsType === 'blogs' && blogCategory && blogLimit > 0) {
7264
+ if (currentItemsType === 'blog' && blogCategory && blogLimit > 0) {
7265
7265
  const fetchBlogsByCategory = () => __awaiter(void 0, void 0, void 0, function* () {
7266
7266
  var _a;
7267
7267
  try {
@@ -7273,7 +7273,7 @@ const WidgetForm = ({
7273
7273
  url: `${widgetRoutesPrefix}/collection-data`,
7274
7274
  data: {
7275
7275
  search: '',
7276
- collectionName: 'blogs',
7276
+ collectionName: 'blog',
7277
7277
  collectionItems: []
7278
7278
  },
7279
7279
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7304,7 +7304,7 @@ const WidgetForm = ({
7304
7304
  }, [blogCategory, blogLimit, currentItemsType, baseUrl, token, widgetRoutesPrefix]);
7305
7305
  // Reset blog category and limit when itemsType changes away from 'blogs'
7306
7306
  React.useEffect(() => {
7307
- if (currentItemsType !== 'blogs') {
7307
+ if (currentItemsType !== 'blog') {
7308
7308
  setBlogCategory(null);
7309
7309
  setBlogLimit(10);
7310
7310
  setBlogCategories([]);
@@ -7649,7 +7649,7 @@ const WidgetForm = ({
7649
7649
  callback(filtered);
7650
7650
  },
7651
7651
  isLoading: blogCategoriesLoading,
7652
- show: currentItemsType === 'blogs' && !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),
7652
+ 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),
7653
7653
  placeholder: 'Select blog category...',
7654
7654
  wrapperClassName: 'khb_grid-item-1of2 khb_padding-right-1',
7655
7655
  customStyles: reactSelectStyles || {},
@@ -7663,7 +7663,7 @@ const WidgetForm = ({
7663
7663
  setBlogLimit(value > 0 ? value : 1);
7664
7664
  return e;
7665
7665
  },
7666
- show: currentItemsType === 'blogs' && !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),
7666
+ 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
7667
  placeholder: 'Enter maximum number of blogs',
7668
7668
  wrapperClassName: 'khb_grid-item-1of2 khb_padding-left-1',
7669
7669
  validations: {
package/index.js CHANGED
@@ -7216,7 +7216,7 @@ const WidgetForm = ({
7216
7216
  const currentItemsType = watch(constants.itemTypeAccessor);
7217
7217
  // Fetch blog categories when itemsType is 'blogs'
7218
7218
  useEffect(() => {
7219
- if (currentItemsType === 'blogs' && blogCategories.length === 0) {
7219
+ if (currentItemsType === 'blog' && blogCategories.length === 0) {
7220
7220
  const fetchBlogCategories = () => __awaiter(void 0, void 0, void 0, function* () {
7221
7221
  var _a;
7222
7222
  try {
@@ -7249,7 +7249,7 @@ const WidgetForm = ({
7249
7249
  }, [currentItemsType, baseUrl, token, widgetRoutesPrefix, blogCategories.length]);
7250
7250
  // Auto-fetch blogs when category or limit changes
7251
7251
  useEffect(() => {
7252
- if (currentItemsType === 'blogs' && blogCategory && blogLimit > 0) {
7252
+ if (currentItemsType === 'blog' && blogCategory && blogLimit > 0) {
7253
7253
  const fetchBlogsByCategory = () => __awaiter(void 0, void 0, void 0, function* () {
7254
7254
  var _a;
7255
7255
  try {
@@ -7261,7 +7261,7 @@ const WidgetForm = ({
7261
7261
  url: `${widgetRoutesPrefix}/collection-data`,
7262
7262
  data: {
7263
7263
  search: '',
7264
- collectionName: 'blogs',
7264
+ collectionName: 'blog',
7265
7265
  collectionItems: []
7266
7266
  },
7267
7267
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7292,7 +7292,7 @@ const WidgetForm = ({
7292
7292
  }, [blogCategory, blogLimit, currentItemsType, baseUrl, token, widgetRoutesPrefix]);
7293
7293
  // Reset blog category and limit when itemsType changes away from 'blogs'
7294
7294
  useEffect(() => {
7295
- if (currentItemsType !== 'blogs') {
7295
+ if (currentItemsType !== 'blog') {
7296
7296
  setBlogCategory(null);
7297
7297
  setBlogLimit(10);
7298
7298
  setBlogCategories([]);
@@ -7637,7 +7637,7 @@ const WidgetForm = ({
7637
7637
  callback(filtered);
7638
7638
  },
7639
7639
  isLoading: blogCategoriesLoading,
7640
- show: currentItemsType === 'blogs' && !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),
7640
+ 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),
7641
7641
  placeholder: 'Select blog category...',
7642
7642
  wrapperClassName: 'khb_grid-item-1of2 khb_padding-right-1',
7643
7643
  customStyles: reactSelectStyles || {},
@@ -7651,7 +7651,7 @@ const WidgetForm = ({
7651
7651
  setBlogLimit(value > 0 ? value : 1);
7652
7652
  return e;
7653
7653
  },
7654
- show: currentItemsType === 'blogs' && !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),
7654
+ 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
7655
  placeholder: 'Enter maximum number of blogs',
7656
7656
  wrapperClassName: 'khb_grid-item-1of2 khb_padding-left-1',
7657
7657
  validations: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knovator/pagecreator-admin",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "dependencies": {
5
5
  "classnames": "^2.3.1",
6
6
  "react-beautiful-dnd": "^13.1.0",