@guillotinaweb/react-gmi 0.28.4 → 0.29.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.
@@ -7295,6 +7295,15 @@
7295
7295
  });
7296
7296
  var get = Ctx.registry.get;
7297
7297
  var fnName = get('searchEngineQueryParamsFunction', SearchEngine);
7298
+
7299
+ if (sortParsed === undefined) {
7300
+ var defaultSortValue = Ctx.registry.getDefaultSortValue(Ctx.context['@type'], {
7301
+ key: 'id',
7302
+ direction: 'des'
7303
+ });
7304
+ sortParsed = parser("_sort_" + defaultSortValue.direction + "=" + defaultSortValue.key + "}");
7305
+ }
7306
+
7298
7307
  var qsParsed = Ctx.client[fnName]({
7299
7308
  path: Ctx.path,
7300
7309
  start: page * PageSize,
@@ -10588,7 +10597,8 @@
10588
10597
  },
10589
10598
  fieldsToFilter: {
10590
10599
  UserManager: ['id', 'email', 'user_name']
10591
- }
10600
+ },
10601
+ defaultSortValue: {}
10592
10602
  };
10593
10603
 
10594
10604
  var get$2 = function get(key, param, fallback) {
@@ -10664,6 +10674,10 @@
10664
10674
  return registry.fieldsToFilter[type] || fallback;
10665
10675
  };
10666
10676
 
10677
+ var getDefaultSortValue = function getDefaultSortValue(type, fallback) {
10678
+ return registry.defaultSortValue[type] || fallback;
10679
+ };
10680
+
10667
10681
  var defaultComponent = function defaultComponent(context) {
10668
10682
  return context.is_folderish ? FolderCtx : ItemCtx;
10669
10683
  };
@@ -10687,6 +10701,7 @@
10687
10701
  getProperties: getProperties,
10688
10702
  getItemsColumn: getItemsColumn,
10689
10703
  getFieldsToFilter: getFieldsToFilter,
10704
+ getDefaultSortValue: getDefaultSortValue,
10690
10705
  getSchemas: getSchemas
10691
10706
  };
10692
10707
  }