@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.
- package/dist/hooks/useRegistry.d.ts +7 -0
- package/dist/react-gmi.esm.js +16 -1
- package/dist/react-gmi.esm.js.map +1 -1
- package/dist/react-gmi.js +16 -1
- package/dist/react-gmi.js.map +1 -1
- package/dist/react-gmi.modern.js +16 -1
- package/dist/react-gmi.modern.js.map +1 -1
- package/dist/react-gmi.umd.js +16 -1
- package/dist/react-gmi.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/react-gmi.js
CHANGED
|
@@ -7299,6 +7299,15 @@ function PanelItems() {
|
|
|
7299
7299
|
});
|
|
7300
7300
|
var get = Ctx.registry.get;
|
|
7301
7301
|
var fnName = get('searchEngineQueryParamsFunction', SearchEngine);
|
|
7302
|
+
|
|
7303
|
+
if (sortParsed === undefined) {
|
|
7304
|
+
var defaultSortValue = Ctx.registry.getDefaultSortValue(Ctx.context['@type'], {
|
|
7305
|
+
key: 'id',
|
|
7306
|
+
direction: 'des'
|
|
7307
|
+
});
|
|
7308
|
+
sortParsed = parser("_sort_" + defaultSortValue.direction + "=" + defaultSortValue.key + "}");
|
|
7309
|
+
}
|
|
7310
|
+
|
|
7302
7311
|
var qsParsed = Ctx.client[fnName]({
|
|
7303
7312
|
path: Ctx.path,
|
|
7304
7313
|
start: page * PageSize,
|
|
@@ -10592,7 +10601,8 @@ var registry = {
|
|
|
10592
10601
|
},
|
|
10593
10602
|
fieldsToFilter: {
|
|
10594
10603
|
UserManager: ['id', 'email', 'user_name']
|
|
10595
|
-
}
|
|
10604
|
+
},
|
|
10605
|
+
defaultSortValue: {}
|
|
10596
10606
|
};
|
|
10597
10607
|
|
|
10598
10608
|
var get$2 = function get(key, param, fallback) {
|
|
@@ -10668,6 +10678,10 @@ var getFieldsToFilter = function getFieldsToFilter(type, fallback) {
|
|
|
10668
10678
|
return registry.fieldsToFilter[type] || fallback;
|
|
10669
10679
|
};
|
|
10670
10680
|
|
|
10681
|
+
var getDefaultSortValue = function getDefaultSortValue(type, fallback) {
|
|
10682
|
+
return registry.defaultSortValue[type] || fallback;
|
|
10683
|
+
};
|
|
10684
|
+
|
|
10671
10685
|
var defaultComponent = function defaultComponent(context) {
|
|
10672
10686
|
return context.is_folderish ? FolderCtx : ItemCtx;
|
|
10673
10687
|
};
|
|
@@ -10691,6 +10705,7 @@ function useRegistry(data) {
|
|
|
10691
10705
|
getProperties: getProperties,
|
|
10692
10706
|
getItemsColumn: getItemsColumn,
|
|
10693
10707
|
getFieldsToFilter: getFieldsToFilter,
|
|
10708
|
+
getDefaultSortValue: getDefaultSortValue,
|
|
10694
10709
|
getSchemas: getSchemas
|
|
10695
10710
|
};
|
|
10696
10711
|
}
|