gatsby-core-theme 44.0.16 → 44.0.17
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/helpers/processor/modules.mjs +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [44.0.17](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.0.16...v44.0.17) (2025-04-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add alphabetical sorting ([a923c31](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/a923c3132448a4502a24eea457825fdeb955cb2e))
|
|
7
|
+
|
|
1
8
|
## [44.0.16](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.0.15...v44.0.16) (2025-04-14)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -256,6 +256,19 @@ export function processCardsV2(
|
|
|
256
256
|
cardItems[b64].sort((a, b) => (a.created_at > b.created_at ? -1 : 1));
|
|
257
257
|
module.items = cardItems[b64].slice(0, itemLimit);
|
|
258
258
|
}
|
|
259
|
+
} else if (sortType === "alphabetical") {
|
|
260
|
+
if (cardItems[b64].length > 0) {
|
|
261
|
+
cardItems[b64].sort((a, b) => {
|
|
262
|
+
if (a.title < b.title) {
|
|
263
|
+
return -1;
|
|
264
|
+
}
|
|
265
|
+
if (a.title > b.title) {
|
|
266
|
+
return 1;
|
|
267
|
+
}
|
|
268
|
+
return 0;
|
|
269
|
+
});
|
|
270
|
+
module.items = module.cards_selector_filters_limit ? cardItems[b64].slice(0, module.cards_selector_filters_limit) : cardItems[b64];
|
|
271
|
+
}
|
|
259
272
|
}
|
|
260
273
|
}
|
|
261
274
|
}
|