@progress/kendo-vue-layout
Version:
81 lines (80 loc) • 1.93 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
const E = "", A = "0", O = "_";
function o(n, r) {
if (u(n))
return r[Number(n)];
{
const t = r[Number(i(n))];
return t.items ? o(c(n), t.items) : void 0;
}
}
function i(n) {
return e(n) ? n : n.split("_")[0];
}
function c(n) {
if (e(n))
return n;
{
const r = n.indexOf("_");
return n.substring(r + 1);
}
}
function S(n) {
return f("0", n);
}
function g(n, r) {
return r.indexOf(n) === 0 ? r.length === n.length || r.charAt(n.length) === "_" : !1;
}
function f(n, r) {
return r ? r + "_" + n : n;
}
function l(n) {
const r = n.lastIndexOf("_");
return r < 0 ? "" : n.substring(0, r);
}
function e(n) {
return n === "" || n.indexOf("_") < 0;
}
function u(n) {
return n !== "" && n.indexOf("_") < 0;
}
function P(n) {
return R(n) === 1;
}
function a(n) {
return s(n) === "0";
}
function s(n) {
const r = n.lastIndexOf("_");
return r < 0 ? n : n.substring(r + 1);
}
function T(n, r, t) {
return u(r) ? n ? Number(r) < t - 1 ? (Number(r) + 1).toString() : "0" : Number(r) > 0 ? (Number(r) - 1).toString() : (t - 1).toString() : r;
}
function R(n) {
return n.split("_").length - 1;
}
export {
E as EMPTY_ID,
O as SEPARATOR,
A as ZERO_LEVEL_ZERO_ITEM_ID,
f as createId,
l as getDirectParentId,
T as getDirectSiblingIdForLevelZero,
S as getFirstChildId,
c as getIdWithoutRootParentId,
o as getItemById,
i as getRootParentId,
s as getShortId,
a as isFirstItemFromSiblings,
e as isIdEmptyOrZeroLevel,
P as isIdFirstLevel,
u as isIdZeroLevel,
g as shouldOpenItem
};