enonic-wizardry
Advanced tools
Comparing version 0.3.9 to 0.3.10
import { IOEither } from "fp-ts/IOEither"; | ||
import { MenuItem } from "enonic-types/menu"; | ||
import { GetMenuParams, MenuItem } from "enonic-types/menu"; | ||
import { EnonicError } from "enonic-fp/errors"; | ||
export declare function getSubMenuByKey(levels: number, key?: string): IOEither<EnonicError, ReadonlyArray<MenuItem>>; | ||
export declare function getSubMenuByKey(levels: number, params?: GetMenuParams, key?: string): IOEither<EnonicError, ReadonlyArray<MenuItem>>; |
@@ -8,7 +8,7 @@ "use strict"; | ||
var pipeable_1 = require("fp-ts/pipeable"); | ||
function getSubMenuByKey(levels, key) { | ||
function getSubMenuByKey(levels, params, key) { | ||
return (key !== undefined) | ||
? pipeable_1.pipe(content_1.get({ key: key }), IOEither_1.chain(menu_1.getSubMenus(levels))) | ||
? pipeable_1.pipe(content_1.get({ key: key }), IOEither_1.chain(menu_1.getSubMenus(levels, params))) | ||
: IOEither_1.right([]); | ||
} | ||
exports.getSubMenuByKey = getSubMenuByKey; |
{ | ||
"name": "enonic-wizardry", | ||
"sideEffects": false, | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"description": "Functional utility library for Enonic XP", | ||
@@ -29,14 +29,14 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"enonic-fp": "^0.3.5", | ||
"enonic-types": "^0.1.4", | ||
"fp-ts": "^2.8.6", | ||
"io-ts": "^2.2.12" | ||
"enonic-fp": "^0.3.6", | ||
"enonic-types": "^0.1.10", | ||
"fp-ts": "^2.9.1", | ||
"io-ts": "^2.2.13" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.8.1", | ||
"@typescript-eslint/parser": "^4.8.1", | ||
"eslint": "^7.13.0", | ||
"@typescript-eslint/eslint-plugin": "^4.11.0", | ||
"@typescript-eslint/parser": "^4.11.0", | ||
"eslint": "^7.16.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.0.5" | ||
"typescript": "^4.1.3" | ||
} | ||
} |
23625
Updatedenonic-fp@^0.3.6
Updatedenonic-types@^0.1.10
Updatedfp-ts@^2.9.1
Updatedio-ts@^2.2.13