enonic-wizardry
Advanced tools
Comparing version 0.2.12 to 0.2.13
import { IOEither } from "fp-ts/lib/IOEither"; | ||
import { MenuItem } from "enonic-types/lib/menu"; | ||
import { EnonicError } from "enonic-fp/lib/errors"; | ||
export declare function getSubMenuByKey(key?: string): IOEither<EnonicError, ReadonlyArray<MenuItem>>; | ||
export declare function getSubMenuByKey(levels: number, key?: string): IOEither<EnonicError, ReadonlyArray<MenuItem>>; |
@@ -6,7 +6,7 @@ "use strict"; | ||
var menu_1 = require("enonic-fp/lib/menu"); | ||
function getSubMenuByKey(key) { | ||
function getSubMenuByKey(levels, key) { | ||
return key | ||
? IOEither_1.chain(menu_1.getSubMenus(2))(content_1.get({ key: key })) | ||
? IOEither_1.chain(menu_1.getSubMenus(levels))(content_1.get({ key: key })) | ||
: IOEither_1.right([]); | ||
} | ||
exports.getSubMenuByKey = getSubMenuByKey; |
{ | ||
"name": "enonic-wizardry", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"description": "Functional utility library for Enonic XP", | ||
@@ -29,9 +29,9 @@ "main": "lib/index.js", | ||
"enonic-fp": "^0.2.12", | ||
"enonic-types": "^0.0.15", | ||
"enonic-types": "^0.0.16", | ||
"fp-ts": "^2.3.1", | ||
"io-ts": "^2.0.2" | ||
"io-ts": "^2.0.3" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^2.12.0", | ||
"@typescript-eslint/parser": "^2.12.0", | ||
"@typescript-eslint/eslint-plugin": "^2.14.0", | ||
"@typescript-eslint/parser": "^2.14.0", | ||
"eslint": "^6.8.0", | ||
@@ -38,0 +38,0 @@ "husky": "^3.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23704
+ Addedenonic-types@0.0.16(transitive)
- Removedenonic-types@0.0.15(transitive)
Updatedenonic-types@^0.0.16
Updatedio-ts@^2.0.3