@progress/kendo-vue-layout
Version:
9 lines (8 loc) • 1.82 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@progress/kendo-vue-common"),o=require("./itemsIdsUtils.js");function v(t){return t&&t.length>0?{items:g.call(this,t),inputItems:t}:{items:[],inputItems:[]}}function R(t){let e={};const{text:s,url:i,icon:l,svgIcon:n,disabled:c,cssClass:a,popupClass:d,cssStyle:u,separator:p,render:f,linkRender:I,contentRender:h,data:m}=t;return s!==void 0&&(e.text=s),i!==void 0&&(e.url=i),l!==void 0&&(e.icon=l),n!==void 0&&(e.svgIcon=n),c!==void 0&&(e.disabled=c),a!==void 0&&(e.cssClass=a),d!==void 0&&(e.popupClass=d),u!==void 0&&(e.cssStyle=u),p!==void 0&&(e.separator=p),f!==void 0&&(e.render=r.templateRendering.call(this,f,r.getListeners.call(this))),I!==void 0&&(e.linkRender=r.templateRendering.call(this,I,r.getListeners.call(this))),h!==void 0&&(e.contentRender=r.templateRendering.call(this,h,r.getListeners.call(this))),m!==void 0&&(e.data=m),e}function g(t,e){const s=[];for(let i=0;i<t.length;i++){const l=t[i],n=R.call(this,l);n.id=o.createId(i.toString(),e),n.isLastFromSiblings=i===t.length-1,n.items=C.call(this,l,n),s.push(n)}return s}function C(t,e){return t.contentRender?[{contentParentItemId:e.id,id:o.createId(o.ZERO_LEVEL_ZERO_ITEM_ID,e.id),isLastFromSiblings:!0,contentRender:r.templateRendering.call(this,t.contentRender,r.getListeners.call(this)),items:[]}]:t.items?g.call(this,t.items,e.id):[]}exports.prepareInputItemsForInternalWork=v;